From 47561716b3e27d069d6462c761ad2d3ff783eca3 Mon Sep 17 00:00:00 2001 From: qndel Date: Sat, 6 Nov 2021 13:03:00 +0100 Subject: [PATCH] fix sound crashes (#3403) --- Source/sound.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);