From 88493c286c3766cd8d914b7f26e37e3e0a3fcb65 Mon Sep 17 00:00:00 2001 From: "uriber%gmail.com" Date: Thu, 3 Aug 2006 19:22:50 +0000 Subject: [PATCH] Check for a null aNode in nsTypedSelection::ContainsNode and return immediately. bug=347036 r=brettw sr=bryner git-svn-id: svn://10.0.0.236/trunk@206507 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsSelection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mozilla/layout/generic/nsSelection.cpp b/mozilla/layout/generic/nsSelection.cpp index ea3745eaad7..433433d44fe 100644 --- a/mozilla/layout/generic/nsSelection.cpp +++ b/mozilla/layout/generic/nsSelection.cpp @@ -6705,7 +6705,7 @@ nsTypedSelection::ContainsNode(nsIDOMNode* aNode, PRBool aAllowPartial, NS_ASSERTION(ValidateRanges(), "Ranges out of sync"); *aYes = PR_FALSE; - if (mRanges.Length() == 0) + if (mRanges.Length() == 0 || !aNode) return NS_OK; PRUint16 nodeType;