commit 5249730647f9e7dd5a17de45ef95d488fdbc22ed
Author: Albert Astals Cid <albert.astals@canonical.com>
Date:   Mon Oct 15 15:51:17 2012 +0200

    Do not crash if gtk_widget_get_window returns NULL

diff --git a/gtk/a11y/gtkwindowaccessible.c b/gtk/a11y/gtkwindowaccessible.c
index 4b88fb5..2e44a5c 100644
--- a/gtk/a11y/gtkwindowaccessible.c
+++ b/gtk/a11y/gtkwindowaccessible.c
@@ -323,7 +323,11 @@ gtk_window_accessible_get_extents (AtkComponent  *component,
       return;
     }
 
-  gdk_window_get_frame_extents (gtk_widget_get_window (widget), &rect);
+  GdkWindow *window = gtk_widget_get_window (widget);
+  if (window == NULL)
+    return;
+
+  gdk_window_get_frame_extents (window, &rect);
 
   *width = rect.width;
   *height = rect.height;
@@ -338,7 +342,7 @@ gtk_window_accessible_get_extents (AtkComponent  *component,
   *y = rect.y;
   if (coord_type == ATK_XY_WINDOW)
     {
-      gdk_window_get_origin (gtk_widget_get_window (widget),
+      gdk_window_get_origin (window,
                              &x_toplevel, &y_toplevel);
       *x -= x_toplevel;
       *y -= y_toplevel;
