From 059884feccfda94a16a7939b3394250723ed7c07 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Mon, 12 Apr 2010 13:46:00 +0200 Subject: Fix segfault, if QPixmap::loadFromData() fails Reviewed-by: Harald Fernengel --- src/gui/image/qpixmap_x11.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/image/qpixmap_x11.cpp') diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp index e1e8a0db5e..f6905d773a 100644 --- a/src/gui/image/qpixmap_x11.cpp +++ b/src/gui/image/qpixmap_x11.cpp @@ -383,7 +383,7 @@ struct QX11AlphaDetector return has; // Will implicitly also check format and return quickly for opaque types... checked = true; - has = const_cast(image)->data_ptr()->checkForAlphaPixels(); + has = image->isNull() ? false : const_cast(image)->data_ptr()->checkForAlphaPixels(); return has; } -- cgit v1.2.3