From ae7b1266a2b99d5082a920d66c6725321727a23e Mon Sep 17 00:00:00 2001 From: "sspitzer%netscape.com" Date: Fri, 3 Dec 1999 09:53:26 +0000 Subject: [PATCH] fix warning. --- mailnews/base/src/nsUrlListenerManager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mailnews/base/src/nsUrlListenerManager.cpp b/mailnews/base/src/nsUrlListenerManager.cpp index a2b1a443128..6340d927e58 100644 --- a/mailnews/base/src/nsUrlListenerManager.cpp +++ b/mailnews/base/src/nsUrlListenerManager.cpp @@ -42,8 +42,10 @@ void nsUrlListenerManager::ReleaseListeners() if(m_listeners) { PRUint32 count; - nsresult rv = m_listeners->Count(&count); - + nsresult rv = m_listeners->Count(&count); + NS_ASSERTION(NS_SUCCEEDED(rv), "m_listeners->Count() failed"); + if (NS_FAILED(rv)) return; + for (int i = count - 1; i >= 0; i--) m_listeners->RemoveElementAt(i); }