Bug 1426062 - Follow-up for bug 1422465: check parent before dereferencing it. r=surkov
authorJorg K <jorgk@jorgk.com>
Wed, 20 Dec 2017 00:00:00 -0500
changeset 448867 2e5458ec951f2da582813b6243c4ce1c0280d056
parent 448866 6fda621a4e3b037a3caf873905ec0b8dff5272e5
child 448868 2b7f5d0ef7fab4c40d4ffeaab24a8a1c22680c2d
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssurkov
bugs1426062, 1422465
milestone59.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 1426062 - Follow-up for bug 1422465: check parent before dereferencing it. r=surkov
accessible/xul/XULListboxAccessible.cpp
--- a/accessible/xul/XULListboxAccessible.cpp
+++ b/accessible/xul/XULListboxAccessible.cpp
@@ -151,17 +151,17 @@ XULListboxAccessible::Value(nsString& aV
   }
 }
 
 role
 XULListboxAccessible::NativeRole()
 {
   // A richlistbox is used with the new autocomplete URL bar, and has a parent
   // popup <panel>.
-  if (mContent->GetParent()->IsXULElement(nsGkAtoms::panel))
+  if (mContent->GetParent() && mContent->GetParent()->IsXULElement(nsGkAtoms::panel))
     return roles::COMBOBOX_LIST;
 
   return IsMulticolumn() ? roles::TABLE : roles::LISTBOX;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // XULListboxAccessible: Table