From 1a2da745099371eeaacba8ce7a9604bfa3bbbb95 Mon Sep 17 00:00:00 2001 From: "erik%netscape.com" Date: Wed, 26 May 1999 22:06:51 +0000 Subject: [PATCH] Added NULL pointer checking, since netlib returns NULL even though return value said it succeeded. git-svn-id: svn://10.0.0.236/trunk@32744 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/intl/strres/src/nsStringBundle.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mozilla/intl/strres/src/nsStringBundle.cpp b/mozilla/intl/strres/src/nsStringBundle.cpp index fcdd27822a2..ddc4dbf4be2 100644 --- a/mozilla/intl/strres/src/nsStringBundle.cpp +++ b/mozilla/intl/strres/src/nsStringBundle.cpp @@ -83,6 +83,13 @@ nsStringBundle::nsStringBundle(nsIURL* aURL, nsILocale* aLocale, #endif return; } + if (!in) { +#ifdef NS_DEBUG + printf("OpenBlockingStream returned success value, but pointer is NULL\n"); +#endif + *aResult = NS_ERROR_UNEXPECTED; + return; + } *aResult = nsComponentManager::CreateInstance(kPersistentPropertiesCID, NULL, kIPersistentPropertiesIID, (void**) &mProps); if (NS_FAILED(*aResult)) {