Bug 839447 - Part 4: Fix a potential null dereference; r=I'm an idiot FIREFOX_AURORA_21_BASE
authorMs2ger <ms2ger@gmail.com>
Tue, 19 Feb 2013 13:20:40 +0100
changeset 122315 cc37417e2c284aed960f98ffa479de4ccdd5c7c3
parent 122314 88d66cdbdc81e898d72c580e7d3c411f78dc4eaa
child 122316 60a3f369ccf05850f0a08fa95cc4223e6d2cf97d
child 122320 cde67a09beaddce99883c78b0a95bea91ad2e63c
push id24332
push userryanvm@gmail.com
push dateTue, 19 Feb 2013 13:42:49 +0000
treeherdermozilla-central@cc37417e2c28 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersI
bugs839447
milestone21.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 839447 - Part 4: Fix a potential null dereference; r=I'm an idiot
content/html/content/src/HTMLOptionElement.cpp
--- a/content/html/content/src/HTMLOptionElement.cpp
+++ b/content/html/content/src/HTMLOptionElement.cpp
@@ -95,17 +95,17 @@ NS_HTML_CONTENT_INTERFACE_TABLE_TAIL_CLA
 
 
 NS_IMPL_ELEMENT_CLONE(HTMLOptionElement)
 
 
 NS_IMETHODIMP
 HTMLOptionElement::GetForm(nsIDOMHTMLFormElement** aForm)
 {
-  NS_ADDREF(*aForm = GetForm());
+  NS_IF_ADDREF(*aForm = GetForm());
   return NS_OK;
 }
 
 nsHTMLFormElement*
 HTMLOptionElement::GetForm()
 {
   nsHTMLSelectElement* selectControl = GetSelect();
   return selectControl ? selectControl->GetForm() : nullptr;