Commit e9300e2f authored by Matthias Clasen's avatar Matthias Clasen

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
parent a754579e
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment