Avoid crashing when we have no content
git-svn-id: svn://10.0.0.236/trunk@5347 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -532,12 +532,14 @@ NS_METHOD nsFrame::HandleEvent(nsIPresContext& aPresContext,
|
||||
{
|
||||
aEventStatus = nsEventStatus_eIgnore;
|
||||
|
||||
nsIEventStateManager *mManager;
|
||||
if (NS_OK == aPresContext.GetEventStateManager(&mManager)) {
|
||||
mManager->SetEventTarget((nsISupports*)mContent);
|
||||
NS_RELEASE(mManager);
|
||||
if (nsnull != mContent) {
|
||||
nsIEventStateManager *mManager;
|
||||
if (NS_OK == aPresContext.GetEventStateManager(&mManager)) {
|
||||
mManager->SetEventTarget((nsISupports*)mContent);
|
||||
NS_RELEASE(mManager);
|
||||
}
|
||||
mContent->HandleDOMEvent(aPresContext, aEvent, nsnull, aEventStatus);
|
||||
}
|
||||
mContent->HandleDOMEvent(aPresContext, aEvent, nsnull, aEventStatus);
|
||||
|
||||
#if DO_SELECTION
|
||||
|
||||
|
||||
Reference in New Issue
Block a user