diff options
author | Kurt Korbatits <kurt.korbatits@nokia.com> | 2010-01-08 09:30:02 +1000 |
---|---|---|
committer | Kurt Korbatits <kurt.korbatits@nokia.com> | 2010-01-08 09:30:02 +1000 |
commit | 3f3e86d6fce5bb781bc41def35d0f15c58ef769c (patch) | |
tree | f79a0317d168a1961c11c2b8f3b772029e2902e1 /src/gui/image/qpixmap.cpp | |
parent | dbbf451755d34be44f6b7ac2e7c03ffe5528fb1b (diff) | |
parent | a3c1b0703575ed5fc364011c73dc104ecdb8ef0c (diff) | |
download | qt4-tools-3f3e86d6fce5bb781bc41def35d0f15c58ef769c.tar.gz |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-multimedia-team into 4.6
Diffstat (limited to 'src/gui/image/qpixmap.cpp')
-rw-r--r-- | src/gui/image/qpixmap.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index 617cfe5f6b..7e4597e052 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -831,14 +831,13 @@ bool QPixmap::load(const QString &fileName, const char *format, Qt::ImageConvers if (QPixmapCache::find(key, *this)) return true; - if (!data) - data = QPixmapData::create(0, 0, QPixmapData::PixmapType); - - if (data->fromFile(fileName, format, flags)) { + QPixmapData *tmp = QPixmapData::create(0, 0, QPixmapData::PixmapType); + if (tmp->fromFile(fileName, format, flags)) { + data = tmp; QPixmapCache::insert(key, *this); return true; } - + delete tmp; return false; } |