summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmap_x11.cpp
diff options
context:
space:
mode:
authorJohannes Zellner <johannes.zellner@nokia.com>2010-04-12 13:46:00 +0200
committerJohannes Zellner <johannes.zellner@nokia.com>2010-04-12 13:46:00 +0200
commit059884feccfda94a16a7939b3394250723ed7c07 (patch)
tree24dd1c90737fd501605cc123ec381ac42d70beb8 /src/gui/image/qpixmap_x11.cpp
parent2f1e7ef93b7faaedf55fddbad280e4aada9bfb9d (diff)
Fix segfault, if QPixmap::loadFromData() fails
Reviewed-by: Harald Fernengel
Diffstat (limited to 'src/gui/image/qpixmap_x11.cpp')
-rw-r--r--src/gui/image/qpixmap_x11.cpp2
1 files changed, 1 insertions, 1 deletions
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<QImage *>(image)->data_ptr()->checkForAlphaPixels();
+ has = image->isNull() ? false : const_cast<QImage *>(image)->data_ptr()->checkForAlphaPixels();
return has;
}