Bug 338391: Properly check if IndexOf returned -1. Patch by dveditz, r/sr=sicking

This commit is contained in:
cvshook@sicking.cc
2006-06-22 22:05:20 +00:00
parent 20401e8787
commit 2fb740cda1

View File

@@ -2483,7 +2483,7 @@ nsGenericElement::doRemoveChildAt(PRUint32 aIndex, PRBool aNotify,
// was processing.
if (guard.Mutated(0)) {
aIndex = container->IndexOf(aKid);
if (aIndex < 0) {
if (NS_STATIC_CAST(PRInt32, aIndex) < 0) {
return NS_OK;
}
}