summaryrefslogtreecommitdiffstats
path: root/src/gui/accessible
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2022-09-02 08:29:47 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2022-09-05 18:29:12 +0200
commit5462485a59373b9871261910895b9b8987442b48 (patch)
tree2c98acb6e63ae6767ccc2c14689087c648ae15fd /src/gui/accessible
parentb4a5f0c57cd9d14dc5a8e825aad6cc329dae1b23 (diff)
a11y atspi: Add null check in GetRowHeader handling
Just like the GetColumnHeader case already does, check that the cell isn't nullptr before trying to retrieve the table cell interface from it. (Not doing so e.g. resulted in a crash with WIP branches of LibreOffice and Orca to make selected cells with a child index not fitting into 32 bit work, s.a. https://bugs.documentfoundation.org/show_bug.cgi?id=150683 ) Pick-to: 6.4 6.3 Change-Id: Idd55fd1f0c49b616c732ddb683814605a46ff319 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/gui/accessible')
-rw-r--r--src/gui/accessible/linux/atspiadaptor.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/accessible/linux/atspiadaptor.cpp b/src/gui/accessible/linux/atspiadaptor.cpp
index 46b4fbe0dc..0d76a5f148 100644
--- a/src/gui/accessible/linux/atspiadaptor.cpp
+++ b/src/gui/accessible/linux/atspiadaptor.cpp
@@ -2506,9 +2506,9 @@ bool AtSpiAdaptor::tableInterface(QAccessibleInterface *interface, const QString
} else if (function == "GetRowHeader"_L1) {
int row = message.arguments().at(0).toInt();
QSpiObjectReference ref;
- QAccessibleTableCellInterface *cell = interface->tableInterface()->cellAt(row, 0)->tableCellInterface();
- if (cell) {
- QList<QAccessibleInterface*> header = cell->rowHeaderCells();
+ QAccessibleInterface *cell = interface->tableInterface()->cellAt(row, 0);
+ if (cell && cell->tableCellInterface()) {
+ QList<QAccessibleInterface*> header = cell->tableCellInterface()->rowHeaderCells();
if (header.size() > 0) {
ref = QSpiObjectReference(connection, QDBusObjectPath(pathForInterface(header.takeAt(0))));
}