Bug 671792 - ASSERTION: ImmAssociateContextEx failed to restore default IMC. r=neil
authorBrian R. Bondy <netzen@gmail.com>
Thu, 25 Aug 2011 11:19:56 -0400
changeset 75901 72459db22a34a168fdb794da36764a16815e3653
parent 75900 079f4e4a1f4b696bb0c405d5ace4706a5ccf13ac
child 75902 00be7279f6ad8c6d2fb94abb1a536b0642c87434
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersneil
bugs671792
milestone9.0a1
Bug 671792 - ASSERTION: ImmAssociateContextEx failed to restore default IMC. r=neil
widget/src/windows/nsWindow.cpp
--- a/widget/src/windows/nsWindow.cpp
+++ b/widget/src/windows/nsWindow.cpp
@@ -657,18 +657,18 @@ nsWindow::Create(nsIWidget *aParent,
   }
 
   return NS_OK;
 }
 
 // Close this nsWindow
 NS_METHOD nsWindow::Destroy()
 {
-  // WM_DESTROY has already fired, we're done.
-  if (nsnull == mWnd)
+  // WM_DESTROY has already fired, avoid calling it twice
+  if (mOnDestroyCalled)
     return NS_OK;
 
   // During the destruction of all of our children, make sure we don't get deleted.
   nsCOMPtr<nsIWidget> kungFuDeathGrip(this);
 
   /**
    * On windows the LayerManagerOGL destructor wants the widget to be around for
    * cleanup. It also would like to have the HWND intact, so we NULL it here.