From 8110509627c6e2c1b1b2a240a94d3aaee22bf4e5 Mon Sep 17 00:00:00 2001 From: "reed@reedloden.com" Date: Tue, 8 Apr 2008 23:16:09 -0700 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] --- layout/base/nsCaret.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layout/base/nsCaret.cpp b/layout/base/nsCaret.cpp index 19153aebff5..2eab8c92fb0 100644 --- a/layout/base/nsCaret.cpp +++ b/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.