From ef1f03df14c2b609e93fdb9cfabb8db7d735f7f8 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Mon, 11 Jul 2016 13:45:40 -0400 Subject: [PATCH] Bug 1029631 - Add a missing null check. r=botond MozReview-Commit-ID: DkInA0lcx8d --- gfx/layers/apz/util/TouchActionHelper.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gfx/layers/apz/util/TouchActionHelper.cpp b/gfx/layers/apz/util/TouchActionHelper.cpp index 9364c370ad66..f28adf66c6a4 100644 --- a/gfx/layers/apz/util/TouchActionHelper.cpp +++ b/gfx/layers/apz/util/TouchActionHelper.cpp @@ -60,6 +60,9 @@ TouchActionHelper::GetAllowedTouchBehavior(nsIWidget* aWidget, const LayoutDevic nsLayoutUtils::GetEventCoordinatesRelativeTo(aWidget, aPoint, viewFrame); nsIFrame *target = nsLayoutUtils::GetFrameForPoint(viewFrame, relativePoint, nsLayoutUtils::IGNORE_ROOT_SCROLL_FRAME); + if (!target) { + return behavior; + } nsIScrollableFrame *nearestScrollableParent = nsLayoutUtils::GetNearestScrollableFrame(target, 0); nsIFrame* nearestScrollableFrame = do_QueryFrame(nearestScrollableParent);