summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-01 21:54:42 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-01 21:54:42 +0300
commitd3b57bd96a07a674432fd28cefd2f20ae5404b8b (patch)
tree3472fa69b3a1b4879f22e371eef75b5e1fbad106 /src/resources
parent5c7aca79bf39182e01dfcae4b69a0ace8142e9b2 (diff)
downloadmanaverse-d3b57bd96a07a674432fd28cefd2f20ae5404b8b.tar.gz
manaverse-d3b57bd96a07a674432fd28cefd2f20ae5404b8b.tar.bz2
manaverse-d3b57bd96a07a674432fd28cefd2f20ae5404b8b.tar.xz
manaverse-d3b57bd96a07a674432fd28cefd2f20ae5404b8b.zip
Dont invalidate non existing images.
It create issues atleast in Mesa.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/image.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resources/image.cpp b/src/resources/image.cpp
index d6f5cd27c..cdfc0ed0c 100644
--- a/src/resources/image.cpp
+++ b/src/resources/image.cpp
@@ -471,7 +471,7 @@ void Image::SDLTerminateAlphaCache()
#ifdef USE_OPENGL
void Image::decRef()
{
- if (getRefCount() <= 1)
+ if (mGLImage && getRefCount() <= 1)
OpenGLImageHelper::invalidate(mGLImage);
Resource::decRef();
}