Be more careful about toplevel possibly being NULL. (#402453, Sebastian

2007-01-30  Matthias Clasen  <mclasen@redhat.com>

        * gdk/x11/gdkwindow-x11.c (gdk_x11_window_move_to_current_desktop):
        (gdk_x11_window_set_user_time): Be more careful about toplevel
        possibly being NULL.  (#402453, Sebastian Bacher)



svn path=/trunk/; revision=17236
This commit is contained in:
Matthias Clasen 2007-01-30 18:36:44 +00:00 committed by Matthias Clasen
parent 98170cf57e
commit 1a2274e7be
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2007-01-30 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_x11_window_move_to_current_desktop):
(gdk_x11_window_set_user_time): Be more careful about toplevel
possibly being NULL. (#402453, Sebastian Bacher)
Tue Jan 30 12:09:56 2007 Tim Janik <timj@gtk.org>
* gtk/gtksettings.c: cleaned up ::color-hash registration to not abuse

View File

@ -2020,6 +2020,10 @@ void
gdk_x11_window_move_to_current_desktop (GdkWindow *window)
{
GdkToplevelX11 *toplevel;
g_return_if_fail (GDK_IS_WINDOW (window));
g_return_if_fail (GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD);
toplevel = _gdk_x11_window_get_toplevel (window);
if (toplevel->on_all_desktops)
@ -3785,6 +3789,7 @@ gdk_window_add_colormap_windows (GdkWindow *window)
if (GDK_WINDOW_DESTROYED (window))
return;
toplevel = gdk_window_get_toplevel (window);
old_windows = NULL;
@ -4236,7 +4241,8 @@ gdk_x11_window_set_user_time (GdkWindow *window,
if (timestamp_long != GDK_CURRENT_TIME)
display_x11->user_time = timestamp_long;
toplevel->user_time = timestamp_long;
if (toplevel)
toplevel->user_time = timestamp_long;
}
#define GDK_SELECTION_MAX_SIZE(display) \