Fix: Crash adding panel to node group

`move_to_parent` is called with a null parent by the Python code
that attempts to add new items to the active item if it's a panel.
This commit is contained in:
Hans Goudey
2023-09-01 14:33:43 -04:00
parent 8779f92e67
commit b36367e663

View File

@@ -603,7 +603,7 @@ static void rna_NodeTreeInterfaceItems_move_to_parent(ID *id,
bNodeTreeInterfacePanel *parent,
int to_position)
{
if (item->item_type == NODE_INTERFACE_PANEL &&
if (item->item_type == NODE_INTERFACE_PANEL && parent &&
!(parent->flag & NODE_INTERFACE_PANEL_ALLOW_CHILD_PANELS))
{
BKE_report(reports, RPT_WARNING, "Parent panel does not allow child panels");