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:
Diffstat (limited to 'source/blender/blenkernel/intern/screen.c')
-rw-r--r--source/blender/blenkernel/intern/screen.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c
index 483876e5e05..2f3ca52a09e 100644
--- a/source/blender/blenkernel/intern/screen.c
+++ b/source/blender/blenkernel/intern/screen.c
@@ -56,7 +56,22 @@ static void spacetype_free(SpaceType *st)
for(art= st->regiontypes.first; art; art= art->next) {
BLI_freelistN(&art->drawcalls);
+#ifdef DISABLE_PYTHON
BLI_freelistN(&art->paneltypes);
+#else
+ {
+ PanelType *pnl, *pnl_next;
+ for(pnl= art->paneltypes.first; pnl; pnl= pnl_next) {
+ pnl_next= pnl->next;
+
+ if(pnl->py_data)
+ BPY_DECREF(pnl->py_data);
+
+ MEM_freeN(pnl);
+ }
+ art->paneltypes.first= art->paneltypes.last= NULL;
+ }
+#endif
BLI_freelistN(&art->headertypes);
}