From 68b7274c5da2c555c7afdaabcec2d84c5e6073e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 9 Oct 2015 12:26:17 +0200 Subject: [PATCH] Initialize AbstractEglTexture::m_image If not set to EGL_NO_IMAGE_KHR the dtor might call eglDestroyImageKHR for an image which never got created resulting in undefined behavior. --- abstract_egl_backend.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/abstract_egl_backend.cpp b/abstract_egl_backend.cpp index 2019de982a..31bbf70dab 100644 --- a/abstract_egl_backend.cpp +++ b/abstract_egl_backend.cpp @@ -182,6 +182,7 @@ AbstractEglTexture::AbstractEglTexture(SceneOpenGL::Texture *texture, AbstractEg : SceneOpenGL::TexturePrivate() , q(texture) , m_backend(backend) + , m_image(EGL_NO_IMAGE_KHR) { m_target = GL_TEXTURE_2D; }