Null fixes
This commit is contained in:
@@ -231,11 +231,12 @@ namespace lime {
|
|||||||
value lime_file_dialog_save_file (value filter, value defaultPath) {
|
value lime_file_dialog_save_file (value filter, value defaultPath) {
|
||||||
|
|
||||||
#ifdef LIME_NFD
|
#ifdef LIME_NFD
|
||||||
return alloc_string (FileDialog::SaveFile (val_string (filter), val_string (defaultPath)));
|
const char* path = FileDialog::SaveFile (val_string (filter), val_string (defaultPath));
|
||||||
#else
|
if (path) return alloc_string (path);
|
||||||
return alloc_null ();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
return alloc_null ();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ namespace lime {
|
|||||||
|
|
||||||
const char* FileDialog::OpenFile (const char* filter, const char* defaultPath) {
|
const char* FileDialog::OpenFile (const char* filter, const char* defaultPath) {
|
||||||
|
|
||||||
nfdchar_t *savePath = NULL;
|
nfdchar_t *savePath = 0;
|
||||||
nfdresult_t result = NFD_OpenDialog (filter, defaultPath, &savePath);
|
nfdresult_t result = NFD_OpenDialog (filter, defaultPath, &savePath);
|
||||||
|
|
||||||
switch (result) {
|
switch (result) {
|
||||||
@@ -49,7 +49,7 @@ namespace lime {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//NFD_PathSet_Free (&pathSet);
|
NFD_PathSet_Free (&pathSet);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ namespace lime {
|
|||||||
|
|
||||||
const char* FileDialog::SaveFile (const char* filter, const char* defaultPath) {
|
const char* FileDialog::SaveFile (const char* filter, const char* defaultPath) {
|
||||||
|
|
||||||
nfdchar_t *savePath = NULL;
|
nfdchar_t *savePath = 0;
|
||||||
nfdresult_t result = NFD_SaveDialog (filter, defaultPath, &savePath);
|
nfdresult_t result = NFD_SaveDialog (filter, defaultPath, &savePath);
|
||||||
|
|
||||||
switch (result) {
|
switch (result) {
|
||||||
|
|||||||
Reference in New Issue
Block a user