diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Tree_Item.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Fl_Tree_Item.cxx b/src/Fl_Tree_Item.cxx index 3472f8e99..9b0239617 100644 --- a/src/Fl_Tree_Item.cxx +++ b/src/Fl_Tree_Item.cxx @@ -95,7 +95,7 @@ Fl_Tree_Item::~Fl_Tree_Item() { } _widget = 0; // Fl_Group will handle destruction _usericon = 0; // user handled allocation - if ( _userdeicon ) delete _userdeicon; // delete our copy (if any) for deactivated icon + _userdeicon = 0; // user handled allocation // focus item? set to null if ( _tree && this == _tree->_item_focus ) { _tree->_item_focus = 0; } @@ -1108,12 +1108,12 @@ void Fl_Tree_Item::draw(int X, int &Y, int W, Fl_Tree_Item *itemfocus, // Item has user icon? Use it int uicon_y = item_y_center - (usericon()->h() >> 1); if ( active ) usericon()->draw(uicon_x,uicon_y); - else userdeicon()->draw(uicon_x,uicon_y); + else if ( userdeicon() ) userdeicon()->draw(uicon_x,uicon_y); } else if ( render && prefs.usericon() ) { // Prefs has user icon? Use it int uicon_y = item_y_center - (prefs.usericon()->h() >> 1); if ( active ) prefs.usericon()->draw(uicon_x,uicon_y); - else prefs.userdeicon()->draw(uicon_x,uicon_y); + else if ( prefs.userdeicon() ) prefs.userdeicon()->draw(uicon_x,uicon_y); } // Draw item's content xmax = draw_item_content(render); |
