summaryrefslogtreecommitdiff
path: root/gtk/gtktreednd.c
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2015-01-19 18:06:03 +0100
committerMatthias Clasen <mclasen@redhat.com>2015-01-24 16:11:51 -0500
commitf4dee9b682b5ef0b00d882f0327f0cbdd317afaf (patch)
tree8c169443855453b1e9eaff5972579641f504e3d9 /gtk/gtktreednd.c
parent9668962da12df65810856178bbb5ec1866a953d0 (diff)
downloadgtk+-f4dee9b682b5ef0b00d882f0327f0cbdd317afaf.tar.gz
Fix transfer annotation for tree_model parameter of gtk_tree_get_row_drag_data() and add nullable, optional
The GtkSelectionData does not own the model set with gtk_tree_set_row_drag_data so change the out param to "transfer none". This fixes a crash after multiple DnD actions due to the bindings stealing a reference each time this function is called. This also adds nullable and optional annotations for tree_model and path while at it. https://bugzilla.gnome.org/show_bug.cgi?id=743193
Diffstat (limited to 'gtk/gtktreednd.c')
-rw-r--r--gtk/gtktreednd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtktreednd.c b/gtk/gtktreednd.c
index 57b6240855..1e230fa215 100644
--- a/gtk/gtktreednd.c
+++ b/gtk/gtktreednd.c
@@ -305,8 +305,8 @@ gtk_tree_set_row_drag_data (GtkSelectionData *selection_data,
/**
* gtk_tree_get_row_drag_data:
* @selection_data: a #GtkSelectionData
- * @tree_model: (out): a #GtkTreeModel
- * @path: (out): row in @tree_model
+ * @tree_model: (nullable) (optional) (transfer none) (out): a #GtkTreeModel
+ * @path: (nullable) (optional) (out): row in @tree_model
*
* Obtains a @tree_model and @path from selection data of target type
* %GTK_TREE_MODEL_ROW. Normally called from a drag_data_received handler.