From 98e0cce1622ea18b02478c0c643d122d95d4cb35 Mon Sep 17 00:00:00 2001 From: "sspitzer%netscape.com" Date: Sat, 2 Mar 2002 01:12:58 +0000 Subject: [PATCH] bulletproof fix for ab crasher #127748. r=racham,sr=bienvenu,a=roc+moz --- mailnews/addrbook/src/nsAbView.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mailnews/addrbook/src/nsAbView.cpp b/mailnews/addrbook/src/nsAbView.cpp index 9ebd05c0a36..901c9ce53fd 100644 --- a/mailnews/addrbook/src/nsAbView.cpp +++ b/mailnews/addrbook/src/nsAbView.cpp @@ -1089,6 +1089,10 @@ NS_IMETHODIMP nsAbView::DeleteSelectedCards() nsresult rv = GetSelectedCards(getter_AddRefs(cardsToDelete)); NS_ENSURE_SUCCESS(rv,rv); + // mDirectory should not be null + // bullet proof (and assert) to help figure out bug #127748 + NS_ENSURE_TRUE(mDirectory, NS_ERROR_UNEXPECTED); + rv = mDirectory->DeleteCards(cardsToDelete); NS_ENSURE_SUCCESS(rv,rv); return rv;