bug 761901 - fix null check review nit to prevent null deref crashes r=me
authorTrevor Saunders <trev.saunders@gmail.com>
Tue, 16 Oct 2012 20:01:48 -0400
changeset 110520 044d1b97438563d6a3867ec720996afc4c1a8726
parent 110519 09e5d52cd8303365e1ad54c97bd831ce394b4666
child 110557 dac5700acf8b6a2da54e920621edc3654c8b6a09
child 110619 81e18ebdef919e76c4fc981fbdf2a181b8a1ed04
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersme
bugs761901
milestone19.0a1
bug 761901 - fix null check review nit to prevent null deref crashes r=me
accessible/src/generic/DocAccessible.cpp
--- a/accessible/src/generic/DocAccessible.cpp
+++ b/accessible/src/generic/DocAccessible.cpp
@@ -1120,17 +1120,17 @@ DocAccessible::AttributeChangedImpl(nsIC
     nsRefPtr<AccEvent> editableChangeEvent =
       new AccStateChangeEvent(aContent, states::EDITABLE);
     FireDelayedAccessibleEvent(editableChangeEvent);
     return;
   }
 
   if (aAttribute == nsGkAtoms::value) {
     Accessible* accessible = GetAccessible(aContent);
-    if(accessible->IsProgress()) {
+    if(accessible && accessible->IsProgress()) {
       FireDelayedAccessibleEvent(nsIAccessibleEvent::EVENT_VALUE_CHANGE,
                                  aContent);
     }
   }
 }
 
 // DocAccessible protected member
 void