Bug 1029631 - Add a missing null check. r=botond

MozReview-Commit-ID: DkInA0lcx8d
This commit is contained in:
Kartikaya Gupta 2016-07-11 13:45:40 -04:00
Родитель 05015521b4
Коммит ef1f03df14
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -60,6 +60,9 @@ TouchActionHelper::GetAllowedTouchBehavior(nsIWidget* aWidget, const LayoutDevic
nsLayoutUtils::GetEventCoordinatesRelativeTo(aWidget, aPoint, viewFrame); nsLayoutUtils::GetEventCoordinatesRelativeTo(aWidget, aPoint, viewFrame);
nsIFrame *target = nsLayoutUtils::GetFrameForPoint(viewFrame, relativePoint, nsLayoutUtils::IGNORE_ROOT_SCROLL_FRAME); nsIFrame *target = nsLayoutUtils::GetFrameForPoint(viewFrame, relativePoint, nsLayoutUtils::IGNORE_ROOT_SCROLL_FRAME);
if (!target) {
return behavior;
}
nsIScrollableFrame *nearestScrollableParent = nsLayoutUtils::GetNearestScrollableFrame(target, 0); nsIScrollableFrame *nearestScrollableParent = nsLayoutUtils::GetNearestScrollableFrame(target, 0);
nsIFrame* nearestScrollableFrame = do_QueryFrame(nearestScrollableParent); nsIFrame* nearestScrollableFrame = do_QueryFrame(nearestScrollableParent);