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.