Somehow this bug didn't surface when I tested the treeview example. It turns out that TreeIter's new method can fail because I implemented Drop. This is because it creates a temporary TreeIter object that has the same pointer as the one that it eventually returns, and its pointer is freed at the end of the new method by the drop method. The simple fix is to not make any temporary TreeIter object.
Somehow this bug didn't surface when I tested the treeview example. It turns out that TreeIter's
new
method can fail because I implementedDrop
. This is because it creates a temporaryTreeIter
object that has the same pointer as the one that it eventually returns, and its pointer is freed at the end of thenew
method by thedrop
method. The simple fix is to not make any temporaryTreeIter
object.