Fix return value test, as pointed out by Albrecht.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10699 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
d95750ede7
commit
1f7eb7bc4e
@ -549,7 +549,7 @@ int Fl_Tree_Item::move(Fl_Tree_Item *item, int op, int pos) {
|
||||
} 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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user