diff options
Diffstat (limited to 'src/resources/resourcemanager.cpp')
-rw-r--r-- | src/resources/resourcemanager.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index 3d23edcd..3013f20b 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -318,7 +318,11 @@ struct DyedImageLoader } int fileSize; void *buffer = l->manager->loadFile(path, fileSize); - if (!buffer) return NULL; + if (!buffer) + { + delete d; + return NULL; + } Resource *res = d ? Image::load(buffer, fileSize, *d) : Image::load(buffer, fileSize); free(buffer); |