summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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();
}