diff --git a/content/xul/document/src/nsXULDocument.cpp b/content/xul/document/src/nsXULDocument.cpp index f65febb43519..ba84c1939685 100644 --- a/content/xul/document/src/nsXULDocument.cpp +++ b/content/xul/document/src/nsXULDocument.cpp @@ -1850,7 +1850,7 @@ ClearBroadcasterMapEntry(PLDHashTable* aTable, PLDHashEntryHdr* aEntry) { BroadcasterMapEntry* entry = NS_STATIC_CAST(BroadcasterMapEntry*, aEntry); - for (PRInt32 i = entry->mListeners.Count(); i>= 0; --i) { + for (PRInt32 i = entry->mListeners.Count()-1; i>= 0; --i) { delete (BroadcastListener*)entry->mListeners[i]; }