From 5577cc769b13e4bc95fb273c1f869427612aa092 Mon Sep 17 00:00:00 2001 From: Philipp Knechtges Date: Thu, 19 May 2011 21:41:30 +0200 Subject: [PATCH] kwin: bug fix for crash when using the raster backend It seems to be possible to generate a QPixmap that is not null, but doesnt have a paintEngine. --- scene_opengl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene_opengl.cpp b/scene_opengl.cpp index d93fd04fb6..f570e0efd1 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -341,7 +341,7 @@ bool SceneOpenGL::Texture::load(const QPixmap& pixmap, GLenum target) return false; // Checking whether QPixmap comes with its own X11 Pixmap - if (pixmap.paintEngine()->type() != QPaintEngine::X11 || pixmap.handle() == 0) { + if (pixmap.paintEngine() == 0 || pixmap.paintEngine()->type() != QPaintEngine::X11 || pixmap.handle() == 0) { return GLTexture::load(pixmap.toImage(), target); }