From 792423680fad51d1ce8e4c8b2b7225d7b5683387 Mon Sep 17 00:00:00 2001 From: Gregor Wagner Date: Thu, 7 Feb 2013 17:46:58 -0800 Subject: [PATCH] Bug 837953 - B2G crash @ nsContentPermissionRequestProxy::GetElement while launching Camera for perf tests. r=dougt --- dom/base/nsContentPermissionHelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom/base/nsContentPermissionHelper.cpp b/dom/base/nsContentPermissionHelper.cpp index e439586f9e42..7b082620b4f7 100644 --- a/dom/base/nsContentPermissionHelper.cpp +++ b/dom/base/nsContentPermissionHelper.cpp @@ -92,7 +92,7 @@ nsContentPermissionRequestProxy::GetElement(nsIDOMElement * *aRequestingElement) return NS_ERROR_FAILURE; } - NS_ADDREF(*aRequestingElement = mParent->mElement); + NS_IF_ADDREF(*aRequestingElement = mParent->mElement); return NS_OK; }