# HG changeset patch # User Richard Laager # Date 1141855402 0 # Node ID 689f652480f73cda4e1ad252dfed48cfa8af4d11 # Parent e4aa2648ca2877c8ffe5340c098e1f16f2297c89 [gaim-migrate @ 15845] For cursor setting, it's the widget's window being NULL that's the problem. Passing in a NULL widget wouldn't make any sense. So, I've clarified the checks here. This fixes a couple assertion failure regressions. committer: Tailor Script diff -r e4aa2648ca28 -r 689f652480f7 src/gtkutils.c --- a/src/gtkutils.c Wed Mar 08 21:37:43 2006 +0000 +++ b/src/gtkutils.c Wed Mar 08 22:03:22 2006 +0000 @@ -2184,7 +2184,8 @@ { GdkCursor *cursor; - if (widget == NULL) + g_return_if_fail(widget != NULL); + if (widget->window == NULL) return; cursor = gdk_cursor_new(GDK_WATCH); @@ -2200,7 +2201,8 @@ void gaim_gtk_clear_cursor(GtkWidget *widget) { - if (widget == NULL) + g_return_if_fail(widget != NULL); + if (widget->window == NULL) return; gdk_window_set_cursor(widget->window, NULL); diff -r e4aa2648ca28 -r 689f652480f7 src/gtkutils.h --- a/src/gtkutils.h Wed Mar 08 21:37:43 2006 +0000 +++ b/src/gtkutils.h Wed Mar 08 22:03:22 2006 +0000 @@ -444,7 +444,7 @@ * After setting the cursor, the display is flushed, so the change will * take effect immediately. * - * If @a widget is @c NULL, this function simply returns. + * If the window for @a widget is @c NULL, this function simply returns. * * @param widget The widget for which to set the mouse pointer * @param cursor_type The type of cursor to set @@ -456,7 +456,7 @@ * * If @a widget is @c NULL, this function simply returns. * - * @param widget The widget for which to clear the cursor + * If the window for @a widget is @c NULL, this function simply returns. * * @note The display is not flushed from this function. */