From 73ee7cb72e89ededacf90306f39110f1719e84c9 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Tue, 6 Mar 2012 11:26:55 +0100 Subject: Check for parent item before calling functions on it. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ic4066d133ef16ce8cf11fcb9fb5ddcc19599e85d Reviewed-by: Jan-Arve Sæther --- src/plugins/accessible/quick/qaccessiblequickitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/accessible/quick/qaccessiblequickitem.cpp b/src/plugins/accessible/quick/qaccessiblequickitem.cpp index 78e7ca86ef..6c13377b3f 100644 --- a/src/plugins/accessible/quick/qaccessiblequickitem.cpp +++ b/src/plugins/accessible/quick/qaccessiblequickitem.cpp @@ -278,7 +278,7 @@ QRect itemScreenRect(QQuickItem *item) // parent size. WE MIGHT HAVE TO REVISIT THESE FALLBACKS. if (itemSize.isEmpty()) { itemSize = QSize((int)item->implicitWidth(), (int)item->implicitHeight()); - if (itemSize.isEmpty()) + if (itemSize.isEmpty() && item->parentItem()) // ### Seems that the above fallback is not enough, fallback to use the parent size... itemSize = QSize((int)item->parentItem()->width(), (int)item->parentItem()->height()); } -- cgit v1.2.3