diff --git a/desktop_version/src/GraphicsResources.cpp b/desktop_version/src/GraphicsResources.cpp index acc1fa71..0b07cd3e 100644 --- a/desktop_version/src/GraphicsResources.cpp +++ b/desktop_version/src/GraphicsResources.cpp @@ -37,6 +37,11 @@ static SDL_Surface* LoadImage(const char *filename, bool noBlend = true, bool no unsigned char *fileIn; size_t length; FILESYSTEM_loadAssetToMemory(filename, &fileIn, &length, false); + if (fileIn == NULL) + { + SDL_assert(0 && "Image file missing!"); + return NULL; + } if (noAlpha) { lodepng_decode24(&data, &width, &height, fileIn, length); diff --git a/desktop_version/src/SoundSystem.cpp b/desktop_version/src/SoundSystem.cpp index e5d0ead8..8c5f962c 100644 --- a/desktop_version/src/SoundSystem.cpp +++ b/desktop_version/src/SoundSystem.cpp @@ -38,6 +38,7 @@ SoundTrack::SoundTrack(const char* fileName) if (mem == NULL) { fprintf(stderr, "Unable to load WAV file %s\n", fileName); + SDL_assert(0 && "WAV file missing!"); return; } SDL_RWops *fileIn = SDL_RWFromConstMem(mem, length);