b=808873 restore null check on gFocusWindow accidentally dropped in dfe49308dc99 r=trivial
authorKarl Tomlinson <karlt+@karlt.net>
Wed, 07 Nov 2012 18:05:01 +1300
changeset 112514 3985e437a262f0705acad140f4d79cc8f776fdac
parent 112513 e40752d769157f3347136c558dc7eae9a8ee2055
child 112515 029ea0fa93d11bc4a95faae2c414979ced8ee610
push id23825
push useremorley@mozilla.com
push dateWed, 07 Nov 2012 12:53:10 +0000
treeherdermozilla-central@8671bfc8e9a8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstrivial
bugs808873
milestone19.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
b=808873 restore null check on gFocusWindow accidentally dropped in dfe49308dc99 r=trivial
widget/gtk2/nsWindow.cpp
--- a/widget/gtk2/nsWindow.cpp
+++ b/widget/gtk2/nsWindow.cpp
@@ -1869,17 +1869,17 @@ nsWindow::CaptureRollupEvents(nsIRollupL
 
 NS_IMETHODIMP
 nsWindow::GetAttention(int32_t aCycleCount)
 {
     LOG(("nsWindow::GetAttention [%p]\n", (void *)this));
 
     GtkWidget* top_window = GetToplevelWidget();
     GtkWidget* top_focused_window =
-        gFocusWindow->GetToplevelWidget();
+        gFocusWindow ? gFocusWindow->GetToplevelWidget() : nullptr;
 
     // Don't get attention if the window is focused anyway.
     if (top_window && (gtk_widget_get_visible(top_window)) &&
         top_window != top_focused_window) {
         SetUrgencyHint(top_window, true);
     }
 
     return NS_OK;