Fixed a crashbug when opening a file that doesn't exist.

This commit is contained in:
Ryan C. Gordon 2002-03-25 08:11:55 +00:00
parent f6b15061c8
commit 6a0a1349a8
1 changed files with 1 additions and 2 deletions

View File

@ -244,7 +244,6 @@ static FileHandle *doOpen(DirHandle *h, const char *name,
char *f = __PHYSFS_platformCvtToDependent((char *)(h->opaque), name, NULL);
void *rc;
FileHandle *retval;
char *str;
BAIL_IF_MACRO(f == NULL, NULL, NULL);
@ -261,7 +260,7 @@ static FileHandle *doOpen(DirHandle *h, const char *name,
if (!rc)
{
free(retval);
BAIL_MACRO(str, NULL);
return(NULL);
} /* if */
retval->opaque = (void *) rc;