app: fix gimp_item_tree_get_insert_pos() with GIMP_IMAGE_ACTIVE_PARENT.

Don't check for NULL parent as it is a valid parent (for a root item).
Check instead just if we are the first item in the list.
This commit is contained in:
Jehan 2020-05-18 00:30:19 +02:00
parent a7c59277fb
commit 5e960ad56b
1 changed files with 1 additions and 1 deletions

View File

@ -459,7 +459,7 @@ gimp_item_tree_get_insert_pos (GimpItemTree *tree,
* If hierarchy is different, use the toplevel container
* (same if there are no selected items).
*/
if (*parent != NULL && *parent != selected_parent)
if (iter != private->selected_items && *parent != selected_parent)
{
*parent = NULL;
break;