From 6979ef621b58fe405efec746504508a128ebaf49 Mon Sep 17 00:00:00 2001 From: "philringnalda@gmail.com" Date: Thu, 3 Apr 2008 20:29:17 -0700 Subject: [PATCH] Bug 426392 - Crash in nsXULPopupManager::ShowPopupCallback when customizing toolbar on OS X, patch by Chris Pearce (chris@pearce.org.nz), r+sr=roc, a=blocker --- layout/xul/base/src/nsXULPopupManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/layout/xul/base/src/nsXULPopupManager.cpp b/layout/xul/base/src/nsXULPopupManager.cpp index fd6a677f8e25..e1a637292a4f 100644 --- a/layout/xul/base/src/nsXULPopupManager.cpp +++ b/layout/xul/base/src/nsXULPopupManager.cpp @@ -523,9 +523,13 @@ CheckCaretDrawingState(nsIDocument *aDocument) { return; nsIPresShell* presShell = focusedDoc->GetPrimaryShell(); + if (!presShell) + return; nsCOMPtr caret; nsresult res = presShell->GetCaret(getter_AddRefs(caret)); + if (!caret) + return; caret->CheckCaretDrawingState(); }