From 59bf2a52ed4cd4c6fa58b016ee6d53e081f1271e Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 24 Nov 2020 18:10:04 +0200 Subject: [PATCH] Initialize the supports partial update flag to false With 870679e46fa82b76a8a9daef75a6ef87700a6ddd, if the partial update extension is unsupported, setSupportsPartialUpdate() won't be called. The problem is that it may leave OpenGLBackend::supportsPartialUpdate() uninitialized, which can lead to a crash if an OpenGL render backend tries to call eglSetDamageRegionKHR() and EGL_KHR_partial_update is unsupported. --- platformsupport/scenes/opengl/backend.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformsupport/scenes/opengl/backend.h b/platformsupport/scenes/opengl/backend.h index a3fbf8a185..6e4ab45857 100644 --- a/platformsupport/scenes/opengl/backend.h +++ b/platformsupport/scenes/opengl/backend.h @@ -295,7 +295,7 @@ private: /** * @brief Whether the backend supports EGL_KHR_partial_update */ - bool m_havePartialUpdate; + bool m_havePartialUpdate = false; bool m_haveSwapBuffersWithDamage = false; /** * @brief Whether the backend supports EGL_KHR_surfaceless_context.