Index: src/Fl_Tree_Item.cxx
===================================================================
--- src/Fl_Tree_Item.cxx	(revision 11806)
+++ src/Fl_Tree_Item.cxx	(working copy)
@@ -115,7 +115,7 @@
   _widget = 0;			// Fl_Group will handle destruction
   _usericon = 0;		// user handled allocation
 #if FLTK_ABI_VERSION >= 10304
-  if ( _userdeicon ) delete _userdeicon;	// delete our copy (if any) for deactivated icon
+  _userdeicon = 0;		// user handled allocation
 #endif
 #if FLTK_ABI_VERSION >= 10303
   // focus item? set to null
@@ -1206,12 +1206,12 @@
 	  // 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);
 	}
 #else
 	if ( render && usericon() ) {
@@ -1441,12 +1441,12 @@
 	  // 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 ( 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 ( userdeicon() ) prefs.userdeicon()->draw(uicon_x,uicon_y);
 	}
 #else
 	if ( usericon() ) {
Index: FL/Fl_Tree_Item.H
===================================================================
--- FL/Fl_Tree_Item.H	(revision 11806)
+++ FL/Fl_Tree_Item.H	(working copy)
@@ -425,26 +425,53 @@
   }
   int visible_r() const;
 
-  /// Set the item's user icon to an Fl_Image. '0' will disable.
+  /// Set the item's user icon to an Fl_Image. Use '0' to disable.
+  /// No internal copy is made, caller must manage icon's memory.
+  ///
+  /// Note, if you expect your items to be deactivated(),
+  /// use userdeicon(Fl_Image*) to set up a 'grayed out' version of your icon
+  /// to be used for display.
+  ///
+  /// \see userdeicon(Fl_Image*)
+  ///
   void usericon(Fl_Image *val) {
     _usericon = val;
-#if FLTK_ABI_VERSION >= 10304
-    // Update deactivated version of icon..
-    if ( _userdeicon ) delete _userdeicon;
-    if ( _usericon ) {
-      _userdeicon = _usericon->copy();
-      _userdeicon->inactive();
-    } else {
-      _userdeicon = 0;
-    }
-#endif
     recalc_tree();		// may change tree geometry
   }
   /// Get the item's user icon as an Fl_Image. Returns '0' if disabled.
   Fl_Image *usericon() const {
     return(_usericon);
   }
+  /// Set the usericon to draw when the item is deactivated. Use '0' to disable.
+  /// No internal copy is made; caller must manage icon's memory.
+  ///
+  /// To create a typical 'grayed out' version of your usericon image,
+  /// you can do the following:
+  ///
+  /// \code
+  ///      // Create tree + usericon for items
+  ///      Fl_Tree *tree = new Fl_Tree(..);
+  ///      Fl_Image *usr_icon = new Fl_Pixmap(..); // your usericon
+  ///      Fl_Image *de_icon  = usr_icon->copy();  // make a copy, and..
+  ///      de_icon->inactive();                    // make it 'grayed out'
+  ///      ...
+  ///      for ( .. ) {                 // item loop..
+  ///        item = tree->add("...");   // create new item
+  ///        item->usericon(usr_icon);  // assign usericon to items
+  ///        item->userdeicon(de_icon); // assign userdeicon to items
+  ///        ..
+  ///      }
+  /// \endcode
+  ///
+  /// In the above example, the app should 'delete' the two icons
+  /// when they're no longer needed (e.g. after the tree is destroyed)
+  ///
+  /// \version 1.3.4
+  ///
 #if FLTK_ABI_VERSION >= 10304
+  void userdeicon(Fl_Image* val) {
+    _userdeicon = val;
+  }
   /// Return the deactivated version of the user icon, if any.
   /// Returns 0 if none.
   Fl_Image* userdeicon() const {
Index: test/tree.fl
===================================================================
--- test/tree.fl	(revision 11806)
+++ test/tree.fl	(working copy)
@@ -98,7 +98,7 @@
     "@xxxxxxxxx@",
     "@xxxxxxxxx@",
     "@@@@@@@@@@@"};
-static Fl_Pixmap L_folderpixmap(L_folder_xpm);
+static Fl_Pixmap L_folder_pixmap(L_folder_xpm);
 
 static const char *L_document_xpm[] = {
     "11 11 3 1",
@@ -116,19 +116,46 @@
     ".@xxxxxxx@.",
     ".@xxxxxxx@.",
     ".@@@@@@@@@."};
-static Fl_Pixmap L_documentpixmap(L_document_xpm);
+static Fl_Pixmap L_document_pixmap(L_document_xpm);
 
+\#if FLTK_ABI_VERSION >= 10304
+// Create deactivated version of document icon
+static Fl_Pixmap L_folder_deicon_pixmap(L_folder_xpm); // copy
+static Fl_Pixmap L_document_deicon_pixmap(L_document_xpm); // copy
+static int first = 1;
+if ( first ) {
+    L_folder_deicon_pixmap.inactive();
+    L_document_deicon_pixmap.inactive();
+    first = 0;
+}
+\#endif
+
 // Assign user icons to tree items
-for ( Fl_Tree_Item *item = tree->first(); item; item=item->next())
-    if ( usericon_radio->value() )
+for ( Fl_Tree_Item *item = tree->first(); item; item=item->next()) {
+    if ( usericon_radio->value() ) {
         // Assign custom icons
-        item->usericon(item->has_children() ? &L_folderpixmap : &L_documentpixmap);
-    else
+        if ( item->has_children() ) {
+            item->usericon(&L_folder_pixmap);
+\#if FLTK_ABI_VERSION >= 10304
+            item->userdeicon(&L_folder_deicon_pixmap);
+\#endif
+        } else {
+            item->usericon(&L_document_pixmap);
+\#if FLTK_ABI_VERSION >= 10304
+            item->userdeicon(&L_document_deicon_pixmap);
+\#endif
+	}
+    } else {
     	// Don't assign custom icons
         item->usericon(0);
-
-tree->redraw();} {}
+\#if FLTK_ABI_VERSION >= 10304
+        item->userdeicon(0);
+\#endif
+    }
 }
+tree->redraw();} {selected
+  }
+}
 
 Function {RebuildTree()} {
   comment {Rebuild the 'example tree' from scratch} open
@@ -1233,7 +1260,7 @@
         callback {if ( deactivate_tree_toggle->value() )
     tree->deactivate();
 else
-    tree->activate();} selected
+    tree->activate();}
         tooltip {Deactivates the entire tree widget} xywh {758 154 100 16} selection_color 1 labelsize 9
       }
       Fl_Light_Button bold_toggle {
