Mercurial > pidgin
changeset 12431:8a1de97b477f
[gaim-migrate @ 14738]
Stupid gdk_window_set_cursor() likes to whine about window being NULL.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Fri, 09 Dec 2005 04:10:41 +0000 |
parents | cc4c4477ea82 |
children | 7d5b5b88f2a7 |
files | src/gtkblist.c |
diffstat | 1 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkblist.c Fri Dec 09 04:05:55 2005 +0000 +++ b/src/gtkblist.c Fri Dec 09 04:10:41 2005 +0000 @@ -5606,17 +5606,21 @@ { if (gtk_check_menu_item_get_active(checkmenuitem)) { - GdkCursor *cursor = gdk_cursor_new(GDK_WATCH); - - gdk_window_set_cursor(gtkblist->window->window, cursor); - gdk_cursor_unref(cursor); + if (gtkblist->window->window != NULL) + { + GdkCursor *cursor = gdk_cursor_new(GDK_WATCH); + gdk_window_set_cursor(gtkblist->window->window, cursor); + gdk_cursor_unref(cursor); + } + while (gtk_events_pending()) gtk_main_iteration(); gaim_gtk_blist_sort_method_set(id); gaim_prefs_set_string("/gaim/gtk/blist/sort_type", id); - gdk_window_set_cursor(gtkblist->window->window, NULL); + if (gtkblist->window->window != NULL) + gdk_window_set_cursor(gtkblist->window->window, NULL); } }