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.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index 312c972f9..3ba99d248 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -372,6 +372,8 @@ struct ResourceLoader
ResourceManager::loader fun;
static Resource *load(void *v)
{
+ if (!v)
+ return NULL;
ResourceLoader *l = static_cast< ResourceLoader * >(v);
int fileSize;
if (!l->manager)
@@ -527,7 +529,8 @@ void ResourceManager::release(Resource *res)
time_t timestamp = tv.tv_sec;
res->mTimeStamp = timestamp;
- if (mOrphanedResources.empty()) mOldestOrphan = timestamp;
+ if (mOrphanedResources.empty())
+ mOldestOrphan = timestamp;
mOrphanedResources.insert(*resIter);
mResources.erase(resIter);