Bug 620423 - nsHTMLEditor::ParseCFHTML foolishly checks aStuffToPaste instead of *aStuffToPaste; r=neil a=roc
authortimeless@mozdev.org
Tue, 11 Jan 2011 10:20:31 -0500
changeset 60296 0294914a8a4599a7ed30bbc35edf53784c29e9d1
parent 60295 14ccd69459d63482b7ed4a8d7866025c2e5388c7
child 60297 f8330dec502bfaecb597405c9a670cd887ffcdb7
push idunknown
push userunknown
push dateunknown
reviewersneil, roc
bugs620423
milestone2.0b10pre
Bug 620423 - nsHTMLEditor::ParseCFHTML foolishly checks aStuffToPaste instead of *aStuffToPaste; r=neil a=roc
editor/libeditor/html/nsHTMLDataTransfer.cpp
--- a/editor/libeditor/html/nsHTMLDataTransfer.cpp
+++ b/editor/libeditor/html/nsHTMLDataTransfer.cpp
@@ -1259,17 +1259,17 @@ nsHTMLEditor::ParseCFHTML(nsCString & aC
   
   // translate platform linebreaks for fragment
   PRInt32 oldLengthInChars = fragUcs2Str.Length() + 1;  // +1 to include null terminator
   PRInt32 newLengthInChars = 0;
   *aStuffToPaste = nsLinebreakConverter::ConvertUnicharLineBreaks(fragUcs2Str.get(),
                                                            nsLinebreakConverter::eLinebreakAny, 
                                                            nsLinebreakConverter::eLinebreakContent, 
                                                            oldLengthInChars, &newLengthInChars);
-  if (!aStuffToPaste)
+  if (!*aStuffToPaste)
   {
     return NS_ERROR_FAILURE;
   }
   
   // translate platform linebreaks for context
   oldLengthInChars = cntxtUcs2Str.Length() + 1;  // +1 to include null terminator
   newLengthInChars = 0;
   *aCfcontext = nsLinebreakConverter::ConvertUnicharLineBreaks(cntxtUcs2Str.get(),