Browse files

Bug 834760: Null-check mAttachedWidgetListener. r=mwu a=blocking-b2g

  • Loading branch information...
1 parent 29087ec commit 524572516c58f7205994f70111539cb30d48ef19 @cgjones cgjones committed Jan 25, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 widget/xpwidgets/PuppetWidget.cpp
View
6 widget/xpwidgets/PuppetWidget.cpp
@@ -263,8 +263,6 @@ PuppetWidget::DispatchEvent(nsGUIEvent* event, nsEventStatus& aStatus)
aStatus = nsEventStatus_eIgnore;
- NS_ABORT_IF_FALSE(mAttachedWidgetListener, "No listener!");
-
if (event->message == NS_COMPOSITION_START) {
mIMEComposing = true;
}
@@ -286,7 +284,9 @@ PuppetWidget::DispatchEvent(nsGUIEvent* event, nsEventStatus& aStatus)
break;
}
- aStatus = mAttachedWidgetListener->HandleEvent(event, mUseAttachedEvents);
+ if (mAttachedWidgetListener) {
+ aStatus = mAttachedWidgetListener->HandleEvent(event, mUseAttachedEvents);
+ }
if (event->message == NS_COMPOSITION_END) {
mIMEComposing = false;

0 comments on commit 5245725

Please sign in to comment.