Skip to content
Permalink
Browse files
Fixed a crashbug when opening a file that doesn't exist.
  • Loading branch information
icculus committed Mar 25, 2002
1 parent f6b1506 commit 6a0a1349a8c02884e096641fb56e6785e609abeb
Showing with 1 addition and 2 deletions.
  1. +1 −2 archivers/dir.c
@@ -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;

0 comments on commit 6a0a134

Please sign in to comment.