aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/util
diff options
context:
space:
mode:
authorDavid Edmundson <davidedmundson@kde.org>2014-07-15 15:27:30 +0200
committerDavid Edmundson <davidedmundson@kde.org>2014-07-23 12:38:27 +0200
commit6d8f0dbd794a97e0a87005f10d29cd5261d8387f (patch)
tree89cd7d57730192698514da0fe16cb8595383e58d /src/quick/scenegraph/util
parent4a793c2c803648410473f65ffd5d3a22b9d35f76 (diff)
Do not crash AtlasTexture if image is null
Change-Id: I77ae68f523641a2e6b75623200f65407b64e1b40 Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/quick/scenegraph/util')
-rw-r--r--src/quick/scenegraph/util/qsgatlastexture.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/scenegraph/util/qsgatlastexture.cpp b/src/quick/scenegraph/util/qsgatlastexture.cpp
index e37344b21c..782beca1de 100644
--- a/src/quick/scenegraph/util/qsgatlastexture.cpp
+++ b/src/quick/scenegraph/util/qsgatlastexture.cpp
@@ -274,6 +274,9 @@ void Atlas::uploadBgra(Texture *texture)
const QRect &r = texture->atlasSubRect();
QImage image = texture->image();
+ if (image.isNull())
+ return;
+
if (image.format() != QImage::Format_ARGB32_Premultiplied
&& image.format() != QImage::Format_RGB32) {
image = image.convertToFormat(QImage::Format_ARGB32_Premultiplied);