Bug 940751 - Guard against potentially dereferencing a null pointer. r=botond

This commit is contained in:
Kartikaya Gupta 2013-11-20 12:18:09 -05:00
parent 2cb9c16032
commit 1f1aeedae0

View File

@ -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<nsIDOMWindowUtils> utils = GetDOMWindowUtils(aContent);