summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmap_x11.cpp
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-11-19 13:53:04 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-11-19 13:53:04 (GMT)
commit4e53466f63bf05e90a69f80fda8580dabc1e9ed0 (patch)
tree0978f427af78291d8dd16004cc4ca33dbe1af433 /src/gui/image/qpixmap_x11.cpp
parent5bd71902f97ba75dc93ccf709dbfdd2ffeb361b2 (diff)
parentfbbdf8698fb0444d5170b7d0a14e870ea789398f (diff)
downloadQt-4e53466f63bf05e90a69f80fda8580dabc1e9ed0.zip
Qt-4e53466f63bf05e90a69f80fda8580dabc1e9ed0.tar.gz
Qt-4e53466f63bf05e90a69f80fda8580dabc1e9ed0.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6
Diffstat (limited to 'src/gui/image/qpixmap_x11.cpp')
-rw-r--r--src/gui/image/qpixmap_x11.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp
index 3f297df..7008fbd 100644
--- a/src/gui/image/qpixmap_x11.cpp
+++ b/src/gui/image/qpixmap_x11.cpp
@@ -416,6 +416,11 @@ void QX11PixmapData::fromImage(const QImage &img,
d = img.depth();
is_null = (w <= 0 || h <= 0);
+ if (is_null) {
+ w = h = 0;
+ return;
+ }
+
if (defaultScreen >= 0 && defaultScreen != xinfo.screen()) {
QX11InfoData* xd = xinfo.getX11Data(true);
xd->screen = defaultScreen;