Re: TreeDragSource data_get location



Actually, I think it's necessary to clear a newly created
GtkSelectionData struct to zeros too (something I didn't change).

Program below gets a segv from the current code.  I think the "data"
pointer in a GtkSelectionData is a malloced block or NULL.
gtk_selection_data_set() does g_free() on the old before copying and
storing the new.

Dunno if anything special should be initialized in the other fields, I
couldn't find the actual code within gtk that does a normal call out to
a treesource *drag_data_get() interface func.

Attachment: selzero.pl
Description: Text Data

Attachment: GtkTreeDnd.xs.drag_data_get-2.diff
Description: Text Data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]