From: Albert Astals Cid Date: Tue, 17 Feb 2015 08:53:27 +0000 Subject: Make sure there's a scene before using it X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=8fccfef424e7d2b7a2019b1f828234145d4011df --- Make sure there's a scene before using it Fixes crash hovering links in quassel Task-number: QTBUG-44509 Change-Id: I77d8d9118ad185ed70a46e91445e2960200e562b Reviewed-by: Michael BrĂ¼ning Reviewed-by: Frederik Gladhorn Reviewed-by: Marc Mutz --- --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -12272,7 +12272,7 @@ { #ifndef QT_NO_GRAPHICSVIEW Q_D(const QWidget); - if (d->extra && d->extra->proxyWidget) { + if (d->extra && d->extra->proxyWidget && d->extra->proxyWidget->scene()) { const QList views = d->extra->proxyWidget->scene()->views(); if (!views.isEmpty()) { const QPointF scenePos = d->extra->proxyWidget->mapToScene(pos); @@ -12307,7 +12307,7 @@ { #ifndef QT_NO_GRAPHICSVIEW Q_D(const QWidget); - if (d->extra && d->extra->proxyWidget) { + if (d->extra && d->extra->proxyWidget && d->extra->proxyWidget->scene()) { const QList views = d->extra->proxyWidget->scene()->views(); if (!views.isEmpty()) { const QPoint viewPortPos = views.first()->viewport()->mapFromGlobal(pos);