Index: mozilla/content/events/src/nsEventStateManager.cpp =================================================================== RCS file: /cvsroot/mozilla/content/events/src/nsEventStateManager.cpp,v retrieving revision 1.647 diff -pU10 -r1.647 mozilla/content/events/src/nsEventStateManager.cpp --- mozilla/content/events/src/nsEventStateManager.cpp +++ mozilla/content/events/src/nsEventStateManager.cpp @@ -407,40 +407,39 @@ SetFrameExternalReference(nsIFrame* aFra NS_IMETHODIMP nsEventStateManager::PreHandleEvent(nsPresContext* aPresContext, nsEvent *aEvent, nsIFrame* aTargetFrame, nsEventStatus* aStatus, nsIView* aView) { NS_ENSURE_ARG_POINTER(aStatus); NS_ENSURE_ARG(aPresContext); + if (!aEvent) { + NS_ERROR("aEvent is null. This should never happen."); + return NS_ERROR_NULL_POINTER; + } mCurrentTarget = aTargetFrame; mCurrentTargetContent = nsnull; // Focus events don't necessarily need a frame. if (NS_EVENT_NEEDS_FRAME(aEvent)) { NS_ASSERTION(mCurrentTarget, "mCurrentTarget is null. this should not happen. see bug #13007"); if (!mCurrentTarget) return NS_ERROR_NULL_POINTER; } if (mCurrentTarget) SetFrameExternalReference(mCurrentTarget); *aStatus = nsEventStatus_eIgnore; - if (!aEvent) { - NS_ERROR("aEvent is null. This should never happen."); - return NS_ERROR_NULL_POINTER; - } - switch (aEvent->message) { case NS_MOUSE_LEFT_BUTTON_DOWN: #ifndef XP_OS2 BeginTrackingDragGesture ( aPresContext, (nsMouseEvent*)aEvent, aTargetFrame ); #endif mLClickCount = ((nsMouseEvent*)aEvent)->clickCount; SetClickCount(aPresContext, (nsMouseEvent*)aEvent, aStatus); mNormalLMouseEventInProcess = PR_TRUE; break; case NS_MOUSE_MIDDLE_BUTTON_DOWN: