Skip to content

Commit

Permalink
Initialize the TreeIter when it's null, Fixes #311
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeWey committed Nov 7, 2020
1 parent aef8944 commit 81ddb59
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions generated/gtkd/gtk/TreeModelT.d
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@ public template TreeModelT(TStruct)
*/
public int getIter(TreeIter iter, TreePath path)
{
if ( iter is null )
iter = new TreeIter();

iter.setModel(this);
return gtk_tree_model_get_iter(
getTreeModelStruct(),
Expand Down
3 changes: 3 additions & 0 deletions src/APILookupGtk.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3653,6 +3653,9 @@ code: start
*/
public int getIter(TreeIter iter, TreePath path)
{
if ( iter is null )
iter = new TreeIter();

iter.setModel(this);
return gtk_tree_model_get_iter(
getTreeModelStruct(),
Expand Down

0 comments on commit 81ddb59

Please sign in to comment.