aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'backends/graphics/opengl')
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index 4c74b7780d..41f35e29eb 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -808,8 +808,13 @@ void OpenGLGraphicsManager::osdMessageUpdateSurface() {
void OpenGLGraphicsManager::displayActivityIconOnOSD(const Graphics::Surface *icon) {
#ifdef USE_OSD
- delete _osdIconSurface;
- _osdIconSurface = nullptr;
+ if (_osdIconSurface) {
+ delete _osdIconSurface;
+ _osdIconSurface = nullptr;
+
+ // Make sure the icon is cleared on the next update
+ _forceRedraw = true;
+ }
if (icon) {
Graphics::Surface *converted = icon->convertTo(_defaultFormatAlpha);