aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorThierry Crozat2016-09-13 22:57:34 +0100
committerThierry Crozat2016-09-13 22:58:13 +0100
commit2d651fd0f4fd8e369e7b7d88eacc8f3b7bebde3a (patch)
tree0cdf7aaaa5fd01fedda76ec2901eb066b741dba5 /backends
parent3b065a05f66abf4a149f6eda33ab47140e462748 (diff)
downloadscummvm-rg350-2d651fd0f4fd8e369e7b7d88eacc8f3b7bebde3a.tar.gz
scummvm-rg350-2d651fd0f4fd8e369e7b7d88eacc8f3b7bebde3a.tar.bz2
scummvm-rg350-2d651fd0f4fd8e369e7b7d88eacc8f3b7bebde3a.zip
OPENGL: Fix dereferencing null pointer in OpenGLGraphicsManager
This fixes a crash when calling displayActivityIconOnOSD with a NULL icon, which is used to remove the current activity icon.
Diffstat (limited to 'backends')
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index 3e2be6e8cd..e4df94c52d 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -821,7 +821,8 @@ void OpenGLGraphicsManager::displayActivityIconOnOSD(const Graphics::Surface *ic
_osdIconChangeRequest = true;
_osdIconNextData.free();
- _osdIconNextData.copyFrom(*icon);
+ if (icon)
+ _osdIconNextData.copyFrom(*icon);
#endif
}