Fix crasher when loading XUL in viewer and no localstore is present.

This commit is contained in:
waterson%netscape.com 1999-10-05 22:22:40 +00:00
Родитель ffaae7a7ee
Коммит de8f3449d5
2 изменённых файлов: 10 добавлений и 4 удалений

Просмотреть файл

@ -3757,13 +3757,16 @@ XULDocumentImpl::Init(void)
rv = nsServiceManager::GetService(kLocalStoreCID,
NS_GET_IID(nsIRDFDataSource),
(nsISupports**) &localstore);
mLocalStore = localstore;
NS_IF_RELEASE(localstore);
// this _could_ fail; e.g., if we've tried to grab the local store
// before profiles have initialized. If so, no big deal; nothing
// will persist.
if (NS_SUCCEEDED(rv)) {
mLocalStore = localstore;
NS_IF_RELEASE(localstore);
}
#if 0
// construct a selection object
if (NS_FAILED(rv = nsComponentManager::CreateInstance(kRangeListCID,

Просмотреть файл

@ -3757,13 +3757,16 @@ XULDocumentImpl::Init(void)
rv = nsServiceManager::GetService(kLocalStoreCID,
NS_GET_IID(nsIRDFDataSource),
(nsISupports**) &localstore);
mLocalStore = localstore;
NS_IF_RELEASE(localstore);
// this _could_ fail; e.g., if we've tried to grab the local store
// before profiles have initialized. If so, no big deal; nothing
// will persist.
if (NS_SUCCEEDED(rv)) {
mLocalStore = localstore;
NS_IF_RELEASE(localstore);
}
#if 0
// construct a selection object
if (NS_FAILED(rv = nsComponentManager::CreateInstance(kRangeListCID,