Skip to content

Commit

Permalink
Fixed a crashbug when opening a file that doesn't exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Mar 25, 2002
1 parent f6b1506 commit 6a0a134
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions archivers/dir.c
Expand Up @@ -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);

Expand All @@ -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;
Expand Down

0 comments on commit 6a0a134

Please sign in to comment.