diff --git a/editor/libeditor/base/nsSelectionState.cpp b/editor/libeditor/base/nsSelectionState.cpp index b9eddf534ba4..8641f411f6df 100644 --- a/editor/libeditor/base/nsSelectionState.cpp +++ b/editor/libeditor/base/nsSelectionState.cpp @@ -471,7 +471,7 @@ nsRangeUpdater::SelAdjInsertText(nsIDOMCharacterData *aTextNode, PRInt32 aOffset if (!count) return NS_OK; nsRangeStore *item; nsCOMPtr node(do_QueryInterface(aTextNode)); - if (!node) NS_ERROR_NULL_POINTER; + if (!node) return NS_ERROR_NULL_POINTER; for (i=0; i node(do_QueryInterface(aTextNode)); - if (!node) NS_ERROR_NULL_POINTER; + if (!node) return NS_ERROR_NULL_POINTER; for (i=0; i