diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2022-09-02 08:29:47 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2022-09-16 21:40:50 +0000 |
commit | 33f1c9e357927b0f5ead964a19763750427869a9 (patch) | |
tree | 840e5175195c24f800e5896a437c0316c2a2dba7 | |
parent | f442fcaa6c566e71b8c9f624f6561b9e785b4ddb (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 )
Change-Id: Idd55fd1f0c49b616c732ddb683814605a46ff319
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 5462485a59373b9871261910895b9b8987442b48)
-rw-r--r-- | src/gui/accessible/linux/atspiadaptor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/accessible/linux/atspiadaptor.cpp b/src/gui/accessible/linux/atspiadaptor.cpp index 7ab9fe2697..63c46bcd6f 100644 --- a/src/gui/accessible/linux/atspiadaptor.cpp +++ b/src/gui/accessible/linux/atspiadaptor.cpp @@ -2444,9 +2444,9 @@ bool AtSpiAdaptor::tableInterface(QAccessibleInterface *interface, const QString } else if (function == QLatin1String("GetRowHeader")) { 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)))); } |