]> Pileus Git - ~andy/gtk/commit
Bug 660554 - gtk_tree_view_drag_begin: assertion `path != NULL' failed
authorKristian Rietveld <kris@loopnest.org>
Sun, 20 Nov 2011 17:51:14 +0000 (18:51 +0100)
committerKristian Rietveld <kris@loopnest.org>
Sun, 20 Nov 2011 19:15:39 +0000 (20:15 +0100)
commita069ec662faed7d1f02f1666f8cffdacf242fd3a
tree9d7d480ef381e779fdb8843ee55c10681bb2be5e
parent64a38bdb823f584284a1bf3fa3abef28690435b2
Bug 660554 - gtk_tree_view_drag_begin: assertion `path != NULL' failed

Turned assertion into silent return.

This assertion is only hit when dragging from an empty tree view.  In
this case, gtk_tree_view_begin_drag() is triggered from gtkdnd.c and not
from gtk_tree_view_maybe_begin_dragging_row().  We actually want to
cancel the drag at this point, but that is not possible with the GTK+
API as far as I can see.

The alternative is to not allowing the drag to start.  This could be
done by simply unsetting the tree view as drag source when it is empty
and setting it as drag source again when rows are added.  I didn't
choose to go with this for now, since this will likely break third party
code.
gtk/gtktreeview.c