openbsd-ports/www/mozilla/patches/patch-xpcom_components_nsComponentManager_cpp
2003-07-05 20:10:57 +00:00

30 lines
962 B
Plaintext

$OpenBSD: patch-xpcom_components_nsComponentManager_cpp,v 1.4 2003/07/05 20:10:57 wilfried Exp $
--- xpcom/components/nsComponentManager.cpp.orig Wed May 14 00:50:02 2003
+++ xpcom/components/nsComponentManager.cpp Tue Jul 1 10:59:32 2003
@@ -2411,9 +2411,12 @@ nsComponentManagerImpl::GetServiceByCont
}
#ifdef XPCOM_CHECK_PENDING_CIDS
- rv = AddPendingCID(entry->mCid);
- if (NS_FAILED(rv))
- return rv;
+ if (entry && entry != kNonExistentContractID)
+ {
+ rv = AddPendingCID(entry->mCid);
+ if (NS_FAILED(rv))
+ return rv;
+ }
#endif
nsCOMPtr<nsISupports> service;
// We need to not be holding the service manager's monitor while calling
@@ -2426,7 +2429,8 @@ nsComponentManagerImpl::GetServiceByCont
mon.Enter();
#ifdef XPCOM_CHECK_PENDING_CIDS
- RemovePendingCID(entry->mCid);
+ if (entry && entry != kNonExistentContractID)
+ RemovePendingCID(entry->mCid);
#endif
if (NS_FAILED(rv))