summaryrefslogtreecommitdiff
path: root/gtk/gtkdnd.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-12-14 19:14:14 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-12-14 19:14:14 +0000
commit2ea833db9f67837504e42531981350bc8519629a (patch)
tree5ee39242126a73c4dcc5d2ceb03895d9e63090a6 /gtk/gtkdnd.c
parentb540c366cc83aa387ddea40307dd98a3a851d26c (diff)
downloadgtk+-2ea833db9f67837504e42531981350bc8519629a.tar.gz
Warn if the icon cannot be loaded. (#323504, Kjartan Maraas)
2005-12-14 Matthias Clasen <mclasen@redhat.com> * gtk/gtkdnd.c (gtk_drag_set_icon_name): Warn if the icon cannot be loaded. (#323504, Kjartan Maraas)
Diffstat (limited to 'gtk/gtkdnd.c')
-rw-r--r--gtk/gtkdnd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 24b6f51211..9caa1a711a 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -3050,7 +3050,10 @@ gtk_drag_set_icon_name (GdkDragContext *context,
pixbuf = gtk_icon_theme_load_icon (icon_theme, icon_name,
icon_size, 0, NULL);
- set_icon_stock_pixbuf (context, NULL, pixbuf, hot_x, hot_y, FALSE);
+ if (pixbuf)
+ set_icon_stock_pixbuf (context, NULL, pixbuf, hot_x, hot_y, FALSE);
+ else
+ g_warning ("Cannot load drag icon from icon name %s", icon_name);
}
/**