Bug 623193 - Fennec crash [@ nsEditor::InsertTextIntoTextNodeImpl ]; r,a=roc
authorEhsan Akhgari <ehsan@mozilla.com>
Sun, 09 Jan 2011 20:14:58 -0500
changeset 60293 016e12c47d299557bab3f5eca8512e23528ecb74
parent 60292 81cd70b6db84f7fff19f3f01e5d83989e7b27f62
child 60294 5f34b7f0308d7f3d92fbf22145d9d114891716d2
push idunknown
push userunknown
push dateunknown
reviewersroc
bugs623193
milestone2.0b10pre
Bug 623193 - Fennec crash [@ nsEditor::InsertTextIntoTextNodeImpl ]; r,a=roc
editor/libeditor/base/nsEditor.cpp
--- a/editor/libeditor/base/nsEditor.cpp
+++ b/editor/libeditor/base/nsEditor.cpp
@@ -2514,17 +2514,17 @@ nsresult nsEditor::InsertTextIntoTextNod
   // caused by IME.  I have to mark the IME transaction as "fixed", which means
   // that furure ime txns won't merge with it.  This is because we don't want
   // future ime txns trying to put their text into a node that is no longer in
   // the document.  This does not break undo/redo, because all these txns are 
   // wrapped in a parent PlaceHolder txn, and placeholder txns are already 
   // savvy to having multiple ime txns inside them.
   
   // delete empty ime text node if there is one
-  if (isIMETransaction)
+  if (isIMETransaction && mIMETextNode)
   {
     PRUint32 len;
     mIMETextNode->GetLength(&len);
     if (!len)
     {
       DeleteNode(mIMETextNode);
       mIMETextNode = nsnull;
       static_cast<IMETextTxn*>(txn.get())->MarkFixed();  // mark the ime txn "fixed"