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.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/resources/resource.cpp b/src/resources/resource.cpp
index 07f31b8f..8f21f5d2 100644
--- a/src/resources/resource.cpp
+++ b/src/resources/resource.cpp
@@ -21,10 +21,10 @@
* $Id$
*/
-#include "resource.h"
-
#include <cassert>
+#include "resource.h"
+
#include "resourcemanager.h"
Resource::~Resource()
@@ -45,10 +45,10 @@ Resource::decRef()
mRefCount--;
- if (mRefCount == 0) {
- // Make sure resource manager won't refer to deleted resource
+ if (mRefCount == 0)
+ {
+ // Warn the manager that this resource is no longer used.
ResourceManager *resman = ResourceManager::getInstance();
- resman->release(mIdPath);
- delete this;
+ resman->release(this);
}
}