add first-window case - when the window with the new title hasn't been seen, add it to the hashtable

This commit is contained in:
alecf%netscape.com 2002-06-17 23:46:29 +00:00
Родитель 07bd7dd42b
Коммит e83eaff6cf
1 изменённых файлов: 6 добавлений и 0 удалений

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

@ -159,6 +159,12 @@ nsWindowDataSource::OnWindowTitleChange(nsIXULWindow *window,
nsCOMPtr<nsISupports> sup =
dont_AddRef(mWindowResources.Get(&key));
// oops, make sure this window is in the hashtable!
if (!sup) {
OnOpenWindow(window);
sup = dont_AddRef(mWindowResources.Get(&key));
}
NS_ENSURE_TRUE(sup, NS_ERROR_UNEXPECTED);
nsCOMPtr<nsIRDFResource> windowResource =