diff --git a/xpfe/appshell/src/nsWebShellWindow.cpp b/xpfe/appshell/src/nsWebShellWindow.cpp index 0a7c178d5546..8143d0182b79 100644 --- a/xpfe/appshell/src/nsWebShellWindow.cpp +++ b/xpfe/appshell/src/nsWebShellWindow.cpp @@ -252,7 +252,9 @@ nsWebShellWindow::WindowResized(nsIWidget* aWidget, PRInt32 aWidth, PRInt32 aHei } nsCOMPtr shellAsWin(do_QueryInterface(mDocShell)); - shellAsWin->SetPositionAndSize(0, 0, aWidth, aHeight, false); + if (shellAsWin) { + shellAsWin->SetPositionAndSize(0, 0, aWidth, aHeight, false); + } // Persist size, but not immediately, in case this OS is firing // repeated size events as the user drags the sizing handle if (!IsLocked())