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 24f346f7..f785f20a 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -316,7 +316,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); |