diff options
author | Johannes Zellner <johannes.zellner@nokia.com> | 2010-04-12 11:46:00 (GMT) |
---|---|---|
committer | Johannes Zellner <johannes.zellner@nokia.com> | 2010-04-12 11:46:00 (GMT) |
commit | 059884feccfda94a16a7939b3394250723ed7c07 (patch) | |
tree | 24dd1c90737fd501605cc123ec381ac42d70beb8 | |
parent | 2f1e7ef93b7faaedf55fddbad280e4aada9bfb9d (diff) | |
download | Qt-059884feccfda94a16a7939b3394250723ed7c07.zip Qt-059884feccfda94a16a7939b3394250723ed7c07.tar.gz Qt-059884feccfda94a16a7939b3394250723ed7c07.tar.bz2 |
Fix segfault, if QPixmap::loadFromData() fails
Reviewed-by: Harald Fernengel
-rw-r--r-- | src/gui/image/qpixmap_x11.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp index e1e8a0d..f6905d7 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; } |