diff --git a/Source/sound.cpp b/Source/sound.cpp index 2a2b11610..344c23694 100644 --- a/Source/sound.cpp +++ b/Source/sound.cpp @@ -164,7 +164,7 @@ std::unique_ptr sound_file_load(const char *path, bool stream) #ifndef STREAM_ALL_AUDIO } else { SDL_RWops *file = SFileOpenRw(path); - if (path == nullptr) { + if (file == nullptr) { ErrDlg("SFileOpenFile failed", path, __FILE__, __LINE__); } size_t dwBytes = SDL_RWsize(file);