From 50610030b059e4b878285cb3f79b451576d98df6 Mon Sep 17 00:00:00 2001 From: Mark Capella Date: Thu, 28 May 2015 02:20:15 -0400 Subject: [PATCH] Bug 1168881 - Enabling AccessibleCarets crashes Firefox when trying to input text, r=tylin --- layout/base/nsPresShell.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index 6f00db8515f..7ca1e72ca31 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -2559,7 +2559,8 @@ PresShell::CheckVisibilityContent(nsIContent* aNode, int16_t aStartOffset, NS_IMETHODIMP PresShell::GetSelectionCaretsVisibility(bool* aOutVisibility) { - *aOutVisibility = (SelectionCaretPrefEnabled() && mSelectionCarets->GetVisibility()); + *aOutVisibility = (SelectionCaretPrefEnabled() && + mSelectionCarets && mSelectionCarets->GetVisibility()); return NS_OK; }