Skip to content

Commit

Permalink
Fix crash on null Qimage in QSGPainterNode::paint
Browse files Browse the repository at this point in the history
Creating a QPainter on a null image is not allowed,
return early if this is the case.

Change-Id: I56f30c0fd84eefc1676d6b980f77269abace07ce
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
  • Loading branch information
Morten Johan Sorvig authored and Qt by Nokia committed Jan 5, 2012
1 parent c738512 commit c582499
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/quick/scenegraph/util/qsgpainternode.cpp
Expand Up @@ -154,6 +154,9 @@ 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)
painter.begin(&m_image);
Expand Down

0 comments on commit c582499

Please sign in to comment.