From 1f1aeedae0c507ef26049113c6e49d27b56ae2c9 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Wed, 20 Nov 2013 12:18:09 -0500 Subject: [PATCH] Bug 940751 - Guard against potentially dereferencing a null pointer. r=botond --- widget/xpwidgets/APZCCallbackHelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widget/xpwidgets/APZCCallbackHelper.cpp b/widget/xpwidgets/APZCCallbackHelper.cpp index a5a592f640c..3e8490783fc 100644 --- a/widget/xpwidgets/APZCCallbackHelper.cpp +++ b/widget/xpwidgets/APZCCallbackHelper.cpp @@ -138,7 +138,7 @@ APZCCallbackHelper::GetScrollIdentifiers(const nsIContent* aContent, uint32_t* aPresShellIdOut, FrameMetrics::ViewID* aViewIdOut) { - if (!nsLayoutUtils::FindIDFor(aContent, aViewIdOut)) { + if (!aContent || !nsLayoutUtils::FindIDFor(aContent, aViewIdOut)) { return false; } nsCOMPtr utils = GetDOMWindowUtils(aContent);