Skip to content

Commit

Permalink
Check for parent item before calling functions on it.
Browse files Browse the repository at this point in the history
Change-Id: Ic4066d133ef16ce8cf11fcb9fb5ddcc19599e85d
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
  • Loading branch information
Frederik Gladhorn authored and Qt by Nokia committed Mar 6, 2012
1 parent 7efdf7a commit 73ee7cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/accessible/quick/qaccessiblequickitem.cpp
Expand Up @@ -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());
}
Expand Down

0 comments on commit 73ee7cb

Please sign in to comment.