summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmap_win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/image/qpixmap_win.cpp')
-rw-r--r--src/gui/image/qpixmap_win.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/image/qpixmap_win.cpp b/src/gui/image/qpixmap_win.cpp
index 1b61484..04027c1 100644
--- a/src/gui/image/qpixmap_win.cpp
+++ b/src/gui/image/qpixmap_win.cpp
@@ -121,6 +121,9 @@ QPixmap QPixmap::grabWindow(WId winId, int x, int y, int w, int h )
HBITMAP QPixmap::toWinHBITMAP(HBitmapFormat format) const
{
+ if (isNull())
+ return 0;
+
HBITMAP bitmap = 0;
if (data->classId() == QPixmapData::RasterClass) {
QRasterPixmapData* d = static_cast<QRasterPixmapData*>(data.data());