Bug 1475964 - Add null checks in nsMaiInterfaceTableCell.cpp. r=davidb
authorRobert Bartlensky <rbartlensky@mozilla.com>
Mon, 16 Jul 2018 15:16:42 +0100
changeset 427480 b3cfdf00c7f26d82137bcd23d5d0eca732152d6b
parent 427479 11b4729e92ecbf99a27d956321295e6a1309ca05
child 427481 a9c6b8e2e0ea933cabd5f31a5bf9250712978fd3
push id34306
push usercsabou@mozilla.com
push dateFri, 20 Jul 2018 21:41:18 +0000
treeherdermozilla-central@d6a5e8aea651 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdavidb
bugs1475964
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1475964 - Add null checks in nsMaiInterfaceTableCell.cpp. r=davidb MozReview-Commit-ID: 5RSioCelGo3
accessible/atk/nsMaiInterfaceTableCell.cpp
--- a/accessible/atk/nsMaiInterfaceTableCell.cpp
+++ b/accessible/atk/nsMaiInterfaceTableCell.cpp
@@ -50,16 +50,19 @@ GetRowSpanCB(AtkTableCell* aCell)
   return 0;
 }
 
 static gboolean
 GetPositionCB(AtkTableCell* aCell, gint* aRow, gint* aCol)
 {
   if (AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aCell))) {
     TableCellAccessible* cell = accWrap->AsTableCell();
+    if (!cell) {
+      return false;
+    }
     *aRow = cell->RowIdx();
     *aCol = cell->ColIdx();
     return true;
   }
 
   if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aCell))) {
     uint32_t rowIdx = 0, colIdx = 0;
     proxy->GetPosition(&rowIdx, &colIdx);
@@ -71,16 +74,19 @@ GetPositionCB(AtkTableCell* aCell, gint*
   return false;
 }
 
 static gboolean
 GetColumnRowSpanCB(AtkTableCell* aCell, gint* aCol, gint* aRow,
                    gint* aColExtent, gint* aRowExtent) {
   if (AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aCell))) {
     TableCellAccessible* cellAcc = accWrap->AsTableCell();
+    if (!cellAcc) {
+      return false;
+    }
     *aCol = cellAcc->ColIdx();
     *aRow = cellAcc->RowIdx();
     *aColExtent = cellAcc->ColExtent();
     *aRowExtent = cellAcc->ColExtent();
     return true;
   }
 
   if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aCell))) {