aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@nokia.com>2012-03-06 11:25:59 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-12 23:15:21 +0100
commit368e2340bafc3d17c22e67ac8bb8bb797614a610 (patch)
tree7794f9c4c0637cc66f9eede9a5c79b8ac64d79f0 /src/plugins
parent6d9b52b12e83cbb52683bea89fe160c1bd8e9541 (diff)
Check that canvas is valid.
During creation the canvas might not have been set. Change-Id: I7ea8922413e3b6fb4ffd2ed9758c57eea1de02db Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/accessible/quick/qaccessiblequickitem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/accessible/quick/qaccessiblequickitem.cpp b/src/plugins/accessible/quick/qaccessiblequickitem.cpp
index 6c13377b3f..45db9fa795 100644
--- a/src/plugins/accessible/quick/qaccessiblequickitem.cpp
+++ b/src/plugins/accessible/quick/qaccessiblequickitem.cpp
@@ -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);