From 307ac216f2668b5ee955912ae2056336a12ee636 Mon Sep 17 00:00:00 2001 From: "jfrancis%netscape.com" Date: Mon, 1 Nov 1999 15:15:56 +0000 Subject: [PATCH] fix for bugs: 16724, 16855; r=sfraser --- content/base/src/nsContentIterator.cpp | 4 ++-- layout/base/src/nsContentIterator.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/content/base/src/nsContentIterator.cpp b/content/base/src/nsContentIterator.cpp index 8af1d2c1149..d566278b979 100644 --- a/content/base/src/nsContentIterator.cpp +++ b/content/base/src/nsContentIterator.cpp @@ -537,7 +537,7 @@ nsresult nsContentIterator::NextNode(nsCOMPtr *ioNextNode) PRInt32 indx; // get next sibling if there is one - if (NS_FAILED(cN->GetParent(*getter_AddRefs(parent))) || !parent) + if (NS_FAILED(cN->GetParent(*getter_AddRefs(parent)))) return NS_ERROR_FAILURE; if (!parent || NS_FAILED(parent->IndexOf(cN, indx))) { @@ -571,7 +571,7 @@ nsresult nsContentIterator::PrevNode(nsCOMPtr *ioNextNode) PRInt32 indx; // get prev sibling if there is one - if (NS_FAILED(cN->GetParent(*getter_AddRefs(parent))) || !parent) + if (NS_FAILED(cN->GetParent(*getter_AddRefs(parent)))) return NS_ERROR_FAILURE; if (!parent || NS_FAILED(parent->IndexOf(cN, indx))) { diff --git a/layout/base/src/nsContentIterator.cpp b/layout/base/src/nsContentIterator.cpp index 8af1d2c1149..d566278b979 100644 --- a/layout/base/src/nsContentIterator.cpp +++ b/layout/base/src/nsContentIterator.cpp @@ -537,7 +537,7 @@ nsresult nsContentIterator::NextNode(nsCOMPtr *ioNextNode) PRInt32 indx; // get next sibling if there is one - if (NS_FAILED(cN->GetParent(*getter_AddRefs(parent))) || !parent) + if (NS_FAILED(cN->GetParent(*getter_AddRefs(parent)))) return NS_ERROR_FAILURE; if (!parent || NS_FAILED(parent->IndexOf(cN, indx))) { @@ -571,7 +571,7 @@ nsresult nsContentIterator::PrevNode(nsCOMPtr *ioNextNode) PRInt32 indx; // get prev sibling if there is one - if (NS_FAILED(cN->GetParent(*getter_AddRefs(parent))) || !parent) + if (NS_FAILED(cN->GetParent(*getter_AddRefs(parent)))) return NS_ERROR_FAILURE; if (!parent || NS_FAILED(parent->IndexOf(cN, indx))) {