dnd: Avoid a crash

gtk_image_definition_new_icon_name ("") returns NULL. Bail
out early in this case to avoid unreffing NULL later.

https://bugzilla.gnome.org/show_bug.cgi?id=762392
This commit is contained in:
Matthias Clasen 2016-02-20 22:43:43 -05:00
parent a754579e44
commit e9300e2f79

View File

@ -2857,7 +2857,7 @@ gtk_drag_set_icon_name (GdkDragContext *context,
GtkImageDefinition *def;
g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
g_return_if_fail (icon_name != NULL);
g_return_if_fail (icon_name != NULL && icon_name[0] != '\0');
def = gtk_image_definition_new_icon_name (icon_name);
set_icon_helper (context, def, hot_x, hot_y);