From b214f946d9aa7f1601367c927b9fd03ca7af38a1 Mon Sep 17 00:00:00 2001 From: "rjc%netscape.com" Date: Thu, 6 May 1999 00:38:54 +0000 Subject: [PATCH] Add some small NULL checks. --- content/xul/templates/src/nsXULSortService.cpp | 4 ++-- rdf/content/src/nsXULSortService.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/content/xul/templates/src/nsXULSortService.cpp b/content/xul/templates/src/nsXULSortService.cpp index 9316d62c5a5..e6f31cfc212 100644 --- a/content/xul/templates/src/nsXULSortService.cpp +++ b/content/xul/templates/src/nsXULSortService.cpp @@ -684,9 +684,9 @@ getNodeValue(nsIContent *node1, nsIRDFResource *sortProperty, sortPtr sortInfo, nsresult rv; cellVal1 = ""; - if (NS_SUCCEEDED(rv = node1->QueryInterface(kIDomXulElementIID, (void **)&dom1))) + if (NS_SUCCEEDED(rv = node1->QueryInterface(kIDomXulElementIID, (void **)&dom1)) && (nsnull != dom1)) { - if (NS_SUCCEEDED(rv = dom1->GetResource(&res1))) + if (NS_SUCCEEDED(rv = dom1->GetResource(&res1)) && (nsnull != res1)) { if ((sortInfo->naturalOrderSort == PR_FALSE) && (sortInfo->sortProperty)) { diff --git a/rdf/content/src/nsXULSortService.cpp b/rdf/content/src/nsXULSortService.cpp index 9316d62c5a5..e6f31cfc212 100644 --- a/rdf/content/src/nsXULSortService.cpp +++ b/rdf/content/src/nsXULSortService.cpp @@ -684,9 +684,9 @@ getNodeValue(nsIContent *node1, nsIRDFResource *sortProperty, sortPtr sortInfo, nsresult rv; cellVal1 = ""; - if (NS_SUCCEEDED(rv = node1->QueryInterface(kIDomXulElementIID, (void **)&dom1))) + if (NS_SUCCEEDED(rv = node1->QueryInterface(kIDomXulElementIID, (void **)&dom1)) && (nsnull != dom1)) { - if (NS_SUCCEEDED(rv = dom1->GetResource(&res1))) + if (NS_SUCCEEDED(rv = dom1->GetResource(&res1)) && (nsnull != res1)) { if ((sortInfo->naturalOrderSort == PR_FALSE) && (sortInfo->sortProperty)) {