diff options
author | Thierry Crozat | 2016-09-13 22:57:34 +0100 |
---|---|---|
committer | Thierry Crozat | 2016-09-13 22:58:13 +0100 |
commit | 2d651fd0f4fd8e369e7b7d88eacc8f3b7bebde3a (patch) | |
tree | 0cdf7aaaa5fd01fedda76ec2901eb066b741dba5 /backends/graphics | |
parent | 3b065a05f66abf4a149f6eda33ab47140e462748 (diff) | |
download | scummvm-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/graphics')
-rw-r--r-- | backends/graphics/opengl/opengl-graphics.cpp | 3 |
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 } |