forked from AuroraMiddleware/gtk
dnd: Be safer
The contents of the selection are documented to not be NULL if size is non-negative. So use an empty string instead of NULL for size 0, avoiding a crash.
This commit is contained in:
parent
4b818495ca
commit
e02fd80adb
@ -171,7 +171,7 @@ gtk_drag_get_data_finish (GtkDragGetData *data,
|
||||
sdata.type = data->mime_type;
|
||||
sdata.format = 8;
|
||||
sdata.length = size;
|
||||
sdata.data = bytes;
|
||||
sdata.data = bytes ? bytes : (guchar *)g_strdup ("");
|
||||
sdata.display = gtk_widget_get_display (data->widget);
|
||||
|
||||
if (site && site->target_list)
|
||||
|
Loading…
Reference in New Issue
Block a user