http://bugzilla.gnome.org/show_bug.cgi?id=482531 - firefox crashed on print preview [@IA__gdk_window_get_toplevel] [@gdk_window_is_toplevel_frozen] Index: gtk+/gdk/gdkwindow.c =================================================================== --- gtk+/gdk/gdkwindow.c (revision 18802) +++ gtk+/gdk/gdkwindow.c (working copy) @@ -615,7 +615,11 @@ gdk_window_get_toplevel (GdkWindow *wind obj = (GdkWindowObject *)window; while (GDK_WINDOW_TYPE (obj) == GDK_WINDOW_CHILD) - obj = (GdkWindowObject *)obj->parent; + { + obj = (GdkWindowObject *)obj->parent; + if (!obj) + return NULL; + } return GDK_WINDOW (obj); } @@ -2297,6 +2301,9 @@ gdk_window_is_toplevel_frozen (GdkWindow toplevel = (GdkWindowObject *)gdk_window_get_toplevel (window); + if (!toplevel) + return FALSE; + return toplevel->update_and_descendants_freeze_count > 0; }