summaryrefslogtreecommitdiff
path: root/src/resources/resourcemanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/resourcemanager.cpp')
-rw-r--r--src/resources/resourcemanager.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index 9c109257..ef8671a8 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -98,11 +98,15 @@ ResourceManager::~ResourceManager()
void
ResourceManager::cleanUp(Resource *res)
{
- logger->log("ResourceManager::~ResourceManager() cleaning up %d "
+ if (res->mRefCount > 0)
+ {
+ logger->log("ResourceManager::~ResourceManager() cleaning up %d "
"reference%s to %s",
res->mRefCount,
(res->mRefCount == 1) ? "" : "s",
res->mIdPath.c_str());
+ }
+
delete res;
}