Skip to content

Commit

Permalink
Check that canvas is valid.
Browse files Browse the repository at this point in the history
During creation the canvas might not have been set.

Change-Id: I7ea8922413e3b6fb4ffd2ed9758c57eea1de02db
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
  • Loading branch information
Frederik Gladhorn authored and Qt by Nokia committed Mar 12, 2012
1 parent 6d9b52b commit 368e234
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/accessible/quick/qaccessiblequickitem.cpp
Expand Up @@ -95,7 +95,7 @@ QAccessibleInterface *QAccessibleQuickItem::parent() const
// QQuickView::declarativeRoot. The former is the true root item,
// but is not a part of the accessibility tree. Check if we hit
// it here and return an interface for the scene instead.
if (parent == canvas->rootItem()) {
if (canvas && (parent == canvas->rootItem())) {
return QAccessible::queryAccessibleInterface(canvas);
} else {
return QAccessible::queryAccessibleInterface(parent);
Expand Down

0 comments on commit 368e234

Please sign in to comment.