mirror of
https://github.com/moparisthebest/hexchat
synced 2024-11-29 04:32:15 -05:00
Fix crash with invalid dnd to userlist
This commit is contained in:
parent
cba4462458
commit
4320d88b90
@ -413,6 +413,7 @@ userlist_dnd_drop (GtkTreeView *widget, GdkDragContext *context,
|
|||||||
guint info, guint ttime, gpointer userdata)
|
guint info, guint ttime, gpointer userdata)
|
||||||
{
|
{
|
||||||
struct User *user;
|
struct User *user;
|
||||||
|
gchar *data;
|
||||||
GtkTreePath *path;
|
GtkTreePath *path;
|
||||||
GtkTreeModel *model;
|
GtkTreeModel *model;
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
@ -425,7 +426,10 @@ userlist_dnd_drop (GtkTreeView *widget, GdkDragContext *context,
|
|||||||
return;
|
return;
|
||||||
gtk_tree_model_get (model, &iter, COL_USER, &user, -1);
|
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
|
static gboolean
|
||||||
|
Loading…
Reference in New Issue
Block a user