From 806ab190c05faae7d9c202a7f2fcbebe4ee7958b Mon Sep 17 00:00:00 2001 From: "scc%netscape.com" Date: Tue, 29 Jun 1999 21:09:56 +0000 Subject: [PATCH] do_QueryInterface(NULL, &error) now returns the appropriate error in |error| --- xpcom/base/nsCOMPtr.cpp | 2 +- xpcom/glue/nsCOMPtr.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xpcom/base/nsCOMPtr.cpp b/xpcom/base/nsCOMPtr.cpp index b2cbf78d9c1a..49f0b843556a 100644 --- a/xpcom/base/nsCOMPtr.cpp +++ b/xpcom/base/nsCOMPtr.cpp @@ -39,7 +39,7 @@ nsCOMPtr_base::assign_with_AddRef( nsISupports* rawPtr ) void nsCOMPtr_base::assign_with_QueryInterface( nsISupports* rawPtr, const nsIID& iid, nsresult* result ) { - nsresult status = NS_OK; + nsresult status = NS_ERROR_NULL_POINTER; if ( !rawPtr || !NS_SUCCEEDED( status = rawPtr->QueryInterface(iid, NSCAP_REINTERPRET_CAST(void**, &rawPtr)) ) ) rawPtr = 0; diff --git a/xpcom/glue/nsCOMPtr.cpp b/xpcom/glue/nsCOMPtr.cpp index b2cbf78d9c1a..49f0b843556a 100644 --- a/xpcom/glue/nsCOMPtr.cpp +++ b/xpcom/glue/nsCOMPtr.cpp @@ -39,7 +39,7 @@ nsCOMPtr_base::assign_with_AddRef( nsISupports* rawPtr ) void nsCOMPtr_base::assign_with_QueryInterface( nsISupports* rawPtr, const nsIID& iid, nsresult* result ) { - nsresult status = NS_OK; + nsresult status = NS_ERROR_NULL_POINTER; if ( !rawPtr || !NS_SUCCEEDED( status = rawPtr->QueryInterface(iid, NSCAP_REINTERPRET_CAST(void**, &rawPtr)) ) ) rawPtr = 0;