Don't crash when requesting text.
Sometimes during initialization the QAccessibleItemRow will still be in an invalid state. Reviewed-by: Jan-Arve (cherry picked from commit 90b4cf4b1aa0f70a62118e200e76dc1dc57985cc)bb10
parent
1422ce7ded
commit
2c7c8cf5d0
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue