diff options
author | TingPing <tingping@tingping.se> | 2014-05-26 05:11:47 -0400 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2014-05-26 05:11:47 -0400 |
commit | 4320d88b9088297e8e8bfe94a119832d7ac381f2 (patch) | |
tree | 4927cb06690d963d1a4dea9dd193bffd751c61bb /src/fe-gtk/userlistgui.c | |
parent | cba4462458be87c4e69e9aa151e2799c6a20fade (diff) |
Fix crash with invalid dnd to userlist
Diffstat (limited to 'src/fe-gtk/userlistgui.c')
-rw-r--r-- | src/fe-gtk/userlistgui.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/fe-gtk/userlistgui.c b/src/fe-gtk/userlistgui.c index 97d08506..19564ece 100644 --- a/src/fe-gtk/userlistgui.c +++ b/src/fe-gtk/userlistgui.c @@ -413,6 +413,7 @@ userlist_dnd_drop (GtkTreeView *widget, GdkDragContext *context, guint info, guint ttime, gpointer userdata) { struct User *user; + gchar *data; GtkTreePath *path; GtkTreeModel *model; GtkTreeIter iter; @@ -425,7 +426,10 @@ userlist_dnd_drop (GtkTreeView *widget, GdkDragContext *context, return; gtk_tree_model_get (model, &iter, COL_USER, &user, -1); - mg_dnd_drop_file (current_sess, user->nick, (char *)gtk_selection_data_get_data (selection_data)); + data = (char *)gtk_selection_data_get_data (selection_data); + + if (data) + mg_dnd_drop_file (current_sess, user->nick, data); } static gboolean |