From e83eaff6cf6466dcb25bdd05d31e27cafed4d6d6 Mon Sep 17 00:00:00 2001 From: "alecf%netscape.com" Date: Mon, 17 Jun 2002 23:46:29 +0000 Subject: [PATCH] add first-window case - when the window with the new title hasn't been seen, add it to the hashtable --- xpfe/components/windowds/nsWindowDataSource.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xpfe/components/windowds/nsWindowDataSource.cpp b/xpfe/components/windowds/nsWindowDataSource.cpp index ebc952f9f00d..40ba6d2ab417 100644 --- a/xpfe/components/windowds/nsWindowDataSource.cpp +++ b/xpfe/components/windowds/nsWindowDataSource.cpp @@ -159,6 +159,12 @@ nsWindowDataSource::OnWindowTitleChange(nsIXULWindow *window, nsCOMPtr 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 windowResource =