Fix #113545: crash when trying to create panel with unknown type
Caused by 6a6dd392e2.
This commit is contained in:
@@ -490,7 +490,9 @@ Panel *BKE_panel_new(PanelType *panel_type)
|
||||
Panel *panel = MEM_cnew<Panel>(__func__);
|
||||
panel->runtime = MEM_new<Panel_Runtime>(__func__);
|
||||
panel->type = panel_type;
|
||||
STRNCPY(panel->panelname, panel_type->idname);
|
||||
if (panel_type) {
|
||||
STRNCPY(panel->panelname, panel_type->idname);
|
||||
}
|
||||
return panel;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user