Fix: Crash dragging node interface panels at root level

Similar to 32ca4caaac
This commit is contained in:
Hans Goudey
2023-09-01 23:03:15 -04:00
parent 840769d855
commit 78495acaa0

View File

@@ -460,14 +460,14 @@ bool NodePanelDropTarget::on_drop(bContext *C, const DragInfo &drag_info) const
}
case DropLocation::Before: {
/* Insert into same panel as the target. */
parent = interface.find_item_parent(panel_.item);
parent = interface.find_item_parent(panel_.item, true);
BLI_assert(parent != nullptr);
index = parent->items().as_span().first_index_try(&panel_.item);
break;
}
case DropLocation::After: {
/* Insert into same panel as the target. */
parent = interface.find_item_parent(panel_.item);
parent = interface.find_item_parent(panel_.item, true);
BLI_assert(parent != nullptr);
index = parent->items().as_span().first_index_try(&panel_.item) + 1;
break;