diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-05-06 23:11:21 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-05-21 12:27:32 -0600 |
commit | 910ea1476664d8a11d57eaf8ff7f281bcfacd184 (patch) | |
tree | ffed95b63dd38a03b058738f26ad89fb38ed1dfa /src/resources/resourcemanager.cpp | |
parent | d34dda737ed8af5135c49e269f5ad608cea8d511 (diff) | |
download | mana-910ea1476664d8a11d57eaf8ff7f281bcfacd184.tar.gz mana-910ea1476664d8a11d57eaf8ff7f281bcfacd184.tar.bz2 mana-910ea1476664d8a11d57eaf8ff7f281bcfacd184.tar.xz mana-910ea1476664d8a11d57eaf8ff7f281bcfacd184.zip |
Fix some issues found by Cppcheck
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); |