summaryrefslogtreecommitdiff
path: root/src/resources/resource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/resource.cpp')
-rw-r--r--src/resources/resource.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/resources/resource.cpp b/src/resources/resource.cpp
index 8701100c..9eff8d8e 100644
--- a/src/resources/resource.cpp
+++ b/src/resources/resource.cpp
@@ -21,9 +21,11 @@
#include "resources/resource.h"
+#include "log.h"
+
#include "resources/resourcemanager.h"
-#include <cassert>
+#include "utils/stringutils.h"
Resource::~Resource()
{
@@ -37,7 +39,8 @@ void Resource::incRef()
void Resource::decRef()
{
// Reference may not already have reached zero
- assert(mRefCount != 0);
+ if (mRefCount == 0)
+ logger->error(strprintf("mRefCount may not be zero for %s", mIdPath.c_str()));
mRefCount--;