diff options
author | Frederik Gladhorn <frederik.gladhorn@nokia.com> | 2011-04-01 10:12:32 (GMT) |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@nokia.com> | 2011-04-01 10:17:09 (GMT) |
commit | 90b4cf4b1aa0f70a62118e200e76dc1dc57985cc (patch) | |
tree | 06baeec31aa2088fcc21ce154e4007b3b826db47 /src/plugins/accessible | |
parent | 1897ca20a343121422b354a7910814ddd37abd17 (diff) | |
download | Qt-90b4cf4b1aa0f70a62118e200e76dc1dc57985cc.zip Qt-90b4cf4b1aa0f70a62118e200e76dc1dc57985cc.tar.gz Qt-90b4cf4b1aa0f70a62118e200e76dc1dc57985cc.tar.bz2 |
Don't crash when requesting text.
Sometimes during initialization the QAccessibleItemRow will
still be in an invalid state.
Reviewed-by: Jan-Arve
Diffstat (limited to 'src/plugins/accessible')
-rw-r--r-- | src/plugins/accessible/widgets/complexwidgets.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/accessible/widgets/complexwidgets.cpp b/src/plugins/accessible/widgets/complexwidgets.cpp index e638413..85be0b0 100644 --- a/src/plugins/accessible/widgets/complexwidgets.cpp +++ b/src/plugins/accessible/widgets/complexwidgets.cpp @@ -971,7 +971,11 @@ QString QAccessibleItemView::text(Text t, int child) const return QAccessibleAbstractScrollArea::text(t, child); QAccessibleItemRow item(itemView(), childIndex(child)); - return item.text(t, 1); + if (item.isValid()) { + return item.text(t, 1); + } else { + return QString(); + } } else { return QAccessibleAbstractScrollArea::text(t, child); } |