From 093e674c1ffab799c803a627cd5297cc8cae9b0b Mon Sep 17 00:00:00 2001 From: Olli Pettay Date: Mon, 11 Jun 2012 00:45:09 +0300 Subject: [PATCH] Bug 763014 - crash in PresShell::HandleEventInternal, r=mats --- layout/base/nsPresShell.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index 2f34faf41f8..d4fbbe4e4eb 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -6408,8 +6408,10 @@ PresShell::HandleEventInternal(nsEvent* aEvent, nsEventStatus* aStatus) } else { nsCOMPtr targetContent; - rv = mCurrentEventFrame->GetContentForEvent(aEvent, - getter_AddRefs(targetContent)); + if (mCurrentEventFrame) { + rv = mCurrentEventFrame->GetContentForEvent(aEvent, + getter_AddRefs(targetContent)); + } if (NS_SUCCEEDED(rv) && targetContent) { nsEventDispatcher::Dispatch(targetContent, mPresContext, aEvent, nsnull, aStatus, &eventCB);