Skip to content

Commit

Permalink
Fixed crash if PHYSFS_init(NULL) is used...
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed May 22, 2003
1 parent 4bf1b30 commit 8dbc9bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions platform/win32.c
Expand Up @@ -300,8 +300,8 @@ char **__PHYSFS_platformDetectAvailableCDs(void)

char *__PHYSFS_platformCalcBaseDir(const char *argv0)
{
if (strchr(argv0, '\\') != NULL) /* default behaviour can handle this. */
return(NULL);
if ((argv0 != NULL) && (strchr(argv0, '\\') != NULL))
return(NULL); /* default behaviour can handle this. */

return(getExePath(argv0));
} /* __PHYSFS_platformCalcBaseDir */
Expand Down

0 comments on commit 8dbc9bf

Please sign in to comment.