Fix for null pointer crash in FetchBindingDocument. Has been r and sr. Just cant remember bug #.

This commit is contained in:
hyatt%netscape.com 2001-08-01 07:50:47 +00:00
Родитель 2f49d5049e
Коммит a939f27d45
1 изменённых файлов: 4 добавлений и 2 удалений

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

@ -1264,10 +1264,12 @@ nsXBLService::FetchBindingDocument(nsIContent* aBoundElement, nsIDocument* aBoun
// Add ourselves to the list of loading docs.
nsCOMPtr<nsIBindingManager> bindingManager;
aBoundDocument->GetBindingManager(getter_AddRefs(bindingManager));
if (aBoundDocument)
aBoundDocument->GetBindingManager(getter_AddRefs(bindingManager));
nsXPIDLCString uri;
aURI->GetSpec(getter_Copies(uri));
bindingManager->PutLoadingDocListener(nsCAutoString(NS_STATIC_CAST(const char*, uri)), xblListener);
if (bindingManager)
bindingManager->PutLoadingDocListener(nsCAutoString(NS_STATIC_CAST(const char*, uri)), xblListener);
// Add our request.
nsCAutoString bindingURI(uri);