summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-10-27 14:17:16 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-10-27 14:17:16 (GMT)
commitabfee117ec2dd5ad5be3b1c497a12f884b28568d (patch)
treebdb9d7f9beb9215558b4d826e597fc8d7f265943 /src/gui/image
parentdbb127c226f131fabe39d9ce89ace5d3e6f7deb9 (diff)
parent8135af2cebdaaccefb95f0be149328077d237a89 (diff)
downloadQt-abfee117ec2dd5ad5be3b1c497a12f884b28568d.zip
Qt-abfee117ec2dd5ad5be3b1c497a12f884b28568d.tar.gz
Qt-abfee117ec2dd5ad5be3b1c497a12f884b28568d.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qpixmap.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index a3b7516..45ff5f4 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -860,6 +860,9 @@ bool QPixmap::load(const QString &fileName, const char *format, Qt::ImageConvers
bool QPixmap::loadFromData(const uchar *buf, uint len, const char *format, Qt::ImageConversionFlags flags)
{
+ if (len == 0 || buf == 0)
+ return false;
+
return data->fromData(buf, len, format, flags);
}