Fix NULL handling in GetDirectory(DESKTOP)
If HOME is NULL, we cannot return here immediately, since we haven't
called `System::GCExitBlocking()`. This currently causes:
```
Critical Error: Allocating from a GC-free thread
```
This is already handled correctly for `USER` and `DOCUMENTS`, however
`DESKTOP` was missed out in f6e38208d3
This commit is contained in:
committed by
Josh Tynjala
parent
cbcb5f029e
commit
c81d70c303
@@ -164,15 +164,13 @@ namespace lime {
|
||||
|
||||
char const* home = getenv ("HOME");
|
||||
|
||||
if (home == NULL) {
|
||||
if (home != NULL) {
|
||||
|
||||
return 0;
|
||||
std::string path = std::string (home) + std::string ("/Desktop");
|
||||
result = new std::wstring (path.begin (), path.end ());
|
||||
|
||||
}
|
||||
|
||||
std::string path = std::string (home) + std::string ("/Desktop");
|
||||
result = new std::wstring (path.begin (), path.end ());
|
||||
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user