From 558aaba110fd4aaa32dfe71eed3e71e1f9db28aa Mon Sep 17 00:00:00 2001 From: Makoto Kato Date: Thu, 26 Nov 2009 17:41:32 +0900 Subject: [PATCH] Bug 530939 - New crash [@ GenerateFlatTextContent] in Firefox 3.6b3. r=Olli.Pettay --- content/events/src/nsContentEventHandler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/events/src/nsContentEventHandler.cpp b/content/events/src/nsContentEventHandler.cpp index 1f0ed00a7067..783ee0a02b8f 100644 --- a/content/events/src/nsContentEventHandler.cpp +++ b/content/events/src/nsContentEventHandler.cpp @@ -230,7 +230,9 @@ static nsresult GenerateFlatTextContent(nsIRange* aRange, NS_ASSERTION(aString.IsEmpty(), "aString must be empty string"); nsINode* startNode = aRange->GetStartParent(); + NS_ENSURE_TRUE(startNode, NS_ERROR_FAILURE); nsINode* endNode = aRange->GetEndParent(); + NS_ENSURE_TRUE(endNode, NS_ERROR_FAILURE); if (startNode == endNode && startNode->IsNodeOfType(nsINode::eTEXT)) { nsIContent* content = static_cast(startNode);