summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qnativeimage.cpp
diff options
context:
space:
mode:
authorIikka Eklund <iikka.eklund@digia.com>2014-04-02 07:36:48 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-02 07:36:48 +0200
commitd6f58e5e17d58c640fc7779652008fda0d66f41d (patch)
treed50d27e260c9eaf4bc2bcb4480b8a069a3aed857 /src/gui/image/qnativeimage.cpp
parent83de197a57ff6c3e5bbad26bd871981285384fcb (diff)
parent0ab63b035a649dc1982c867cd37d466d249004b9 (diff)
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Diffstat (limited to 'src/gui/image/qnativeimage.cpp')
-rw-r--r--src/gui/image/qnativeimage.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp
index 09cdf41399..356bdc09e4 100644
--- a/src/gui/image/qnativeimage.cpp
+++ b/src/gui/image/qnativeimage.cpp
@@ -64,6 +64,8 @@ QNativeImage::~QNativeImage()
QImage::Format QNativeImage::systemFormat()
{
+ if (!QGuiApplication::primaryScreen())
+ return QImage::Format_Invalid;
return QGuiApplication::primaryScreen()->handle()->format();
}