diff options
Diffstat (limited to 'widgets/misc/e-cursors.c')
-rw-r--r-- | widgets/misc/e-cursors.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/widgets/misc/e-cursors.c b/widgets/misc/e-cursors.c index b4eb2436ec..d38fe71d0c 100644 --- a/widgets/misc/e-cursors.c +++ b/widgets/misc/e-cursors.c @@ -17,9 +17,16 @@ void cursors_init (void); void cursors_shutdown (void); #define cursor_set(win,c) \ - gdk_window_set_cursor (win, gnumeric_cursors [c].cursor) + do { \ + if (win) \ + gdk_window_set_cursor (win, gnumeric_cursors [c].cursor); \ +} while (0) #define cursor_set_widget(w,c) \ - gdk_window_set_cursor (GTK_WIDGET (w)->window, gnumeric_cursors [c].cursor) + do { \ + if (GTK_WIDGET (w)->window) \ + gdk_window_set_cursor (GTK_WIDGET (w)->window, gnumeric_cursors [c].cursor); \ +} while (0) + #endif /* GNUMERIC_CURSORS_H */ |