$OpenBSD: patch-src_Fl_Tree_Item_cxx,v 1.1 2017/04/22 07:35:31 jsg Exp $
--- src/Fl_Tree_Item.cxx.orig	Sat Apr 22 17:10:56 2017
+++ src/Fl_Tree_Item.cxx	Sat Apr 22 17:13:24 2017
@@ -549,7 +549,7 @@ int Fl_Tree_Item::move(Fl_Tree_Item *item, int op, int
   } else {					// different parent?
     if ( to > to_parent->children() )		// try to prevent a reparent() error
       return -4;
-    if ( from_parent->deparent(from) < 0 )	// deparent self from current parent
+    if ( from_parent->deparent(from) == NULL )	// deparent self from current parent
       return -5;
     if ( to_parent->reparent(this, to) < 0 ) {	// reparent self to new parent at position 'to'
       to_parent->reparent(this, 0);		// failed? shouldn't happen, reparent at 0
