summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/quick/scenegraph/util/qsgpainternode.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/quick/scenegraph/util/qsgpainternode.cpp b/src/quick/scenegraph/util/qsgpainternode.cpp
index d1a1accd5b..d4a810c30a 100644
--- a/src/quick/scenegraph/util/qsgpainternode.cpp
+++ b/src/quick/scenegraph/util/qsgpainternode.cpp
@@ -154,13 +154,12 @@ void QSGPainterNode::paint()
{
QRect dirtyRect = m_dirtyRect.isNull() ? QRect(0, 0, m_size.width(), m_size.height()) : m_dirtyRect;
- if (m_image.isNull())
- return;
-
QPainter painter;
- if (m_actualRenderTarget == QQuickPaintedItem::Image)
+ if (m_actualRenderTarget == QQuickPaintedItem::Image) {
+ if (m_image.isNull())
+ return;
painter.begin(&m_image);
- else {
+ } else {
if (!m_gl_device) {
m_gl_device = new QOpenGLPaintDevice(m_fboSize);
m_gl_device->setPaintFlipped(true);