Fixed compilation on *NIX.

This commit is contained in:
Gunnar Beutner 2012-05-26 21:36:24 +02:00
parent 33d67401b9
commit b9af44cd98
1 changed files with 4 additions and 1 deletions

View File

@ -348,7 +348,10 @@ string Application::GetExeDirectory(void) const
PathEnv = getenv("PATH"); PathEnv = getenv("PATH");
if (PathEnv != NULL) { if (PathEnv != NULL) {
PathEnv = Memory::StrDup(PathEnv); PathEnv = strdup(PathEnv);
if (PathEnv == NULL)
throw bad_alloc();
FoundPath = false; FoundPath = false;