diff --git a/src/Fl_Tree.cxx b/src/Fl_Tree.cxx index a810861cc..2e64f1815 100644 --- a/src/Fl_Tree.cxx +++ b/src/Fl_Tree.cxx @@ -1118,7 +1118,9 @@ Fl_Tree_Item* Fl_Tree::insert(Fl_Tree_Item *item, const char *name, int pos) { int Fl_Tree::remove(Fl_Tree_Item *item) { // Item being removed is focus item? zero focus if ( item == _item_focus ) _item_focus = 0; +#if FLTK_ABI_VERSION >= 10301 if ( item == _lastselect ) _lastselect = 0; +#endif /*FLTK_ABI_VERSION*/ if ( item == _root ) { clear(); } else { @@ -1137,7 +1139,9 @@ void Fl_Tree::clear() { _root->clear_children(); delete _root; _root = 0; _item_focus = 0; +#if FLTK_ABI_VERSION >= 10301 _lastselect = 0; +#endif /*FLTK_ABI_VERSION*/ } /// Clear all the children for \p 'item'.