diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-11-30 05:58:20 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-12-01 05:22:42 (GMT) |
commit | bc992c8e40fcfdcfe0015dd88dda77c318c10a55 (patch) | |
tree | c497c33cca06f54f821c17a3cc4f8c6361d6f3a3 /src/gui | |
parent | 0eb65a6d6ff0665d6db2d1ba29b700a308a24fca (diff) | |
download | Qt-bc992c8e40fcfdcfe0015dd88dda77c318c10a55.zip Qt-bc992c8e40fcfdcfe0015dd88dda77c318c10a55.tar.gz Qt-bc992c8e40fcfdcfe0015dd88dda77c318c10a55.tar.bz2 |
Fix crash in qt3support QPixmap constructor
Reviewed-by: Trond
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/image/qpixmap.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index 985a20b..617cfe5 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -1165,7 +1165,7 @@ QPixmap QPixmap::grabWidget(QWidget * widget, const QRect &rect) Qt::HANDLE QPixmap::handle() const { #if defined(Q_WS_X11) - if (data->classId() == QPixmapData::X11Class) + if (data && data->classId() == QPixmapData::X11Class) return static_cast<const QX11PixmapData*>(data.constData())->handle(); #endif return 0; @@ -1216,7 +1216,7 @@ QPixmap::QPixmap(const QImage& image) if (!qt_pixmap_thread_test()) return; - if (data->pixelType() == QPixmapData::BitmapType) + if (data && data->pixelType() == QPixmapData::BitmapType) *this = QBitmap::fromImage(image); else *this = fromImage(image); |