summaryrefslogtreecommitdiffstats
path: root/src/plugins/accessible/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/accessible/widgets')
-rw-r--r--src/plugins/accessible/widgets/qaccessiblewidgets.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp
index 59dc03666b..cbb3092b1d 100644
--- a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp
+++ b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp
@@ -430,8 +430,9 @@ QAccessible::State QAccessibleMdiSubWindow::state() const
state.focused = true;
if (!mdiSubWindow()->isVisible())
state.invisible = true;
- if (!mdiSubWindow()->parentWidget()->contentsRect().contains(mdiSubWindow()->geometry()))
- state.offscreen = true;
+ if (const QWidget *parent = mdiSubWindow()->parentWidget())
+ if (!parent->contentsRect().contains(mdiSubWindow()->geometry()))
+ state.offscreen = true;
if (!mdiSubWindow()->isEnabled())
state.disabled = true;
return state;