diff --git a/widget/src/gtk/nsWidget.cpp b/widget/src/gtk/nsWidget.cpp index 986f34b243da..a6a7bf5209c6 100644 --- a/widget/src/gtk/nsWidget.cpp +++ b/widget/src/gtk/nsWidget.cpp @@ -397,9 +397,8 @@ void nsWidget::OnDestroy() // release references to children, device context, toolkit + app shell nsBaseWidget::OnDestroy(); - NS_ADDREF_THIS(); + nsCOMPtr kungFuDeathGrip = this; DispatchStandardEvent(NS_DESTROY); - NS_ADDREF_THIS(); } gint