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 ffff44f8da
commit 66161c5f7c

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);