diff --git a/mozilla/xpcom/ds/nsCOMArray.cpp b/mozilla/xpcom/ds/nsCOMArray.cpp index 9a2702232ec..37c3af874ed 100644 --- a/mozilla/xpcom/ds/nsCOMArray.cpp +++ b/mozilla/xpcom/ds/nsCOMArray.cpp @@ -135,13 +135,10 @@ PRBool nsCOMArray_base::RemoveObjectAt(PRInt32 aIndex) { nsISupports* element = ObjectAt(aIndex); - if (element) { - PRBool result = mArray.RemoveElementAt(aIndex); - if (result) - NS_IF_RELEASE(element); - return result; - } - return PR_FALSE; + PRBool result = mArray.RemoveElementAt(aIndex); + if (result) + NS_IF_RELEASE(element); + return result; } // useful for destructors