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:
Tobiasz Laskowski
2025-08-17 12:38:34 +01:00
committed by Josh Tynjala
parent cbcb5f029e
commit c81d70c303

View File

@@ -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;