summaryrefslogtreecommitdiff
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
parent5c7aca79bf39182e01dfcae4b69a0ace8142e9b2 (diff)
downloadplus-d3b57bd96a07a674432fd28cefd2f20ae5404b8b.tar.gz
plus-d3b57bd96a07a674432fd28cefd2f20ae5404b8b.tar.bz2
plus-d3b57bd96a07a674432fd28cefd2f20ae5404b8b.tar.xz
plus-d3b57bd96a07a674432fd28cefd2f20ae5404b8b.zip
Dont invalidate non existing images.
It create issues atleast in Mesa.
-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();
}