Bug 310379, crash [@nsMacEventHandler::Scroll]. Check for !widgetToScroll. r=mano sr=smfr

This commit is contained in:
mark%moxienet.com 2005-09-29 17:26:09 +00:00
Родитель 0c257cc408
Коммит 4d084d9b8b
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -1390,6 +1390,11 @@ nsMacEventHandler::Scroll(EventMouseWheelAxis inAxis, PRInt32 inDelta,
// from an nsMacWindow, then inWindow should refer to that nsMacWindow.
nsIWidget* widgetToScroll = inWindow->FindWidgetHit(inMouseLoc);
// Not all scroll events for the window are over a widget. Consider
// the title bar.
if (!widgetToScroll)
return PR_FALSE;
nsMouseScrollEvent scrollEvent(PR_TRUE, NS_MOUSE_SCROLL, widgetToScroll);
// The direction we get from the carbon event is opposite from the way