Skip to content

Commit

Permalink
pcsx2: Throw the exception
Browse files Browse the repository at this point in the history
Coverity CID 146842: Dereference after null check (FORWARD_NULL)
  • Loading branch information
turtleli committed Oct 6, 2015
1 parent 76e61d4 commit addf3d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pcsx2/Elfheader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void ElfObject::readFile()
FILE *f;

f = fopen( filename.ToUTF8(), "rb" );
if (f == NULL) Exception::FileNotFound( filename );
if (f == NULL) throw Exception::FileNotFound( filename );

fseek(f, 0, SEEK_SET);
rsize = fread(data.GetPtr(), 1, data.GetSizeInBytes(), f);
Expand Down

1 comment on commit addf3d5

@gregory38
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, good catch!

Please sign in to comment.