Bug 278546 Unchecked null pointer crash in nsPresShell::GetViewToScroll when pressing an arrow key while the sidebar's Tabs menubutton has focus r+sr=bz

This commit is contained in:
neil%parkwaycc.co.uk 2005-01-16 21:25:15 +00:00
Родитель 84b4d075ff
Коммит ac13ac9ed9
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -3650,7 +3650,8 @@ PresShell::GetViewToScroll(nsLayoutUtils::Direction aDirection)
// For example, this happens in the case of overflow:scroll.
// In that case we still use GetNearestScrollingView() because
// we need a scrolling view that matches aDirection.
nsIView* startView = svp? svp->GetScrollableView()->View() : startFrame->GetClosestView();
nsIScrollableView* sv;
nsIView* startView = svp && (sv = svp->GetScrollableView()) ? sv->View() : startFrame->GetClosestView();
NS_ASSERTION(startView, "No view to start searching for scrollable view from");
scrollView = nsLayoutUtils::GetNearestScrollingView(startView, aDirection);
}