Skip to content

Commit

Permalink
NativeFile: Do not check if SDL_GetError() is empty string.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikuAuahDark committed Jan 4, 2025
1 parent 66d1657 commit 70cc725
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/modules/filesystem/NativeFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,9 @@ bool NativeFile::open(Mode newmode)

file = SDL_IOFromFile(filename.c_str(), getModeString(newmode));
if (file == nullptr)
{
std::string err = SDL_GetError();
throw love::Exception("Could not open file %s: %s", filename.c_str(), SDL_GetError());

if (err != "")
throw love::Exception("Could not open file %s: %s", filename.c_str(), err.c_str());
}
else
mode = newmode;
mode = newmode;

return file != nullptr;
}
Expand Down

0 comments on commit 70cc725

Please sign in to comment.