From 43fdadd8ea567d5fcddfa7e59003a48c21bab2ac Mon Sep 17 00:00:00 2001 From: "reed%reedloden.com" Date: Wed, 9 Apr 2008 06:16:09 +0000 Subject: [PATCH] Bug 427163 - "Crash [@ nsContentUtils::ContentIsDescendantOf] with contenteditable, right-clicking and document.write" (add null check) [p=chris@pearce.org.nz (Chris Pearce [cpearce]) r+sr=roc a1.9=damons] git-svn-id: svn://10.0.0.236/trunk@249897 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsCaret.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mozilla/layout/base/nsCaret.cpp b/mozilla/layout/base/nsCaret.cpp index 19153aebff5..2eab8c92fb0 100644 --- a/mozilla/layout/base/nsCaret.cpp +++ b/mozilla/layout/base/nsCaret.cpp @@ -1005,6 +1005,8 @@ PRBool nsCaret::IsMenuPopupHidingCaret() if (!node) return PR_TRUE; // No selection/caret to draw. nsCOMPtr caretContent = do_QueryInterface(node); + if (!caretContent) + return PR_TRUE; // No selection/caret to draw. // If there's a menu popup open before the popup with // the caret, don't show the caret.