[Bf-blender-cvs] [db1a04313c3] blender2.8: Fix crash unregistering parent panel before children.

Brecht Van Lommel noreply at git.blender.org
Sat Oct 6 20:58:09 CEST 2018


Commit: db1a04313c3223250b6e6ae1b3652f0a134b8239
Author: Brecht Van Lommel
Date:   Sat Oct 6 20:56:08 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBdb1a04313c3223250b6e6ae1b3652f0a134b8239

Fix crash unregistering parent panel before children.

This caused crashes with addon enabling/disabling and template loading.

===================================================================

M	source/blender/makesrna/intern/rna_ui.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index 4af658da1aa..333181b3593 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -204,6 +204,11 @@ static void rna_Panel_unregister(Main *UNUSED(bmain), StructRNA *type)
 
 	WM_paneltype_remove(pt);
 
+	for (LinkData *link = pt->children.first; link; link = link->next) {
+		PanelType *child_pt = link->data;
+		child_pt->parent = NULL;
+	}
+
 	BLI_freelistN(&pt->children);
 	BLI_freelinkN(&art->paneltypes, pt);



More information about the Bf-blender-cvs mailing list