Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-10-06 21:56:08 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-10-06 21:56:31 +0300
commitdb1a04313c3223250b6e6ae1b3652f0a134b8239 (patch)
tree0faa6679e308e1eb8adc26fa8ad764eedcf05e0d /source/blender/makesrna/intern/rna_ui.c
parent7d5fb2e103e03046194d69640aadf7e76a700620 (diff)
Fix crash unregistering parent panel before children.
This caused crashes with addon enabling/disabling and template loading.
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui.c')
-rw-r--r--source/blender/makesrna/intern/rna_ui.c5
1 files changed, 5 insertions, 0 deletions
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);