diff --git a/project/src/ExternalInterface.cpp b/project/src/ExternalInterface.cpp index 054a67c21..8d6330690 100644 --- a/project/src/ExternalInterface.cpp +++ b/project/src/ExternalInterface.cpp @@ -592,7 +592,17 @@ namespace lime { if (!val_is_null (company)) companyName = val_string (company); if (!val_is_null (title)) titleName = val_string (title); - return alloc_string (System::GetDirectory ((SystemDirectory)val_int (type), companyName, titleName)); + const char* r = System::GetDirectory ((SystemDirectory)val_int (type), companyName, titleName); + + if (r) { + + return alloc_string(r); + + } else { + + return alloc_null(); + + } } @@ -873,4 +883,4 @@ extern "C" int lime_register_prims () { return 0; -} \ No newline at end of file +}