diff --git a/xpfe/appshell/src/nsXULWindow.cpp b/xpfe/appshell/src/nsXULWindow.cpp index 1ef2864cb3a..49f72ed411b 100644 --- a/xpfe/appshell/src/nsXULWindow.cpp +++ b/xpfe/appshell/src/nsXULWindow.cpp @@ -767,9 +767,10 @@ NS_IMETHODIMP nsXULWindow::ShowModal() appShell->Create(0, nsnull); appShell->Spinup(); - - nsCOMPtr window = mWindow; // Store locally so it doesn't die on - // us + // Store locally so it doesn't die on us + nsCOMPtr window = mWindow; + nsCOMPtr tempRef = this; + window->SetModal(PR_TRUE); mContinueModalLoop = PR_TRUE;