[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28013] trunk/blender/source/blender/ makesrna/intern/rna_wm.c: Fix #21641: crash when disabling active addon, removing operator
Brecht Van Lommel
brecht at blender.org
Mon Apr 5 16:22:00 CEST 2010
Revision: 28013
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28013
Author: blendix
Date: 2010-04-05 16:21:57 +0200 (Mon, 05 Apr 2010)
Log Message:
-----------
Fix #21641: crash when disabling active addon, removing operator
type could still leave it in the history stack.
Modified Paths:
--------------
trunk/blender/source/blender/makesrna/intern/rna_wm.c
Modified: trunk/blender/source/blender/makesrna/intern/rna_wm.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_wm.c 2010-04-05 12:17:33 UTC (rev 28012)
+++ trunk/blender/source/blender/makesrna/intern/rna_wm.c 2010-04-05 14:21:57 UTC (rev 28013)
@@ -612,6 +612,12 @@
if(!ot)
return;
+ /* update while blender is running */
+ if(C) {
+ WM_operator_stack_clear((bContext*)C);
+ WM_main_add_notifier(NC_SCREEN|NA_EDITED, NULL);
+ }
+
RNA_struct_free_extension(type, &ot->ext);
idname= ot->idname;
@@ -620,10 +626,6 @@
/* not to be confused with the RNA_struct_free that WM_operatortype_remove calls, they are 2 different srna's */
RNA_struct_free(&BLENDER_RNA, type);
-
- /* update while blender is running */
- if(C)
- WM_main_add_notifier(NC_SCREEN|NA_EDITED, NULL);
}
static int operator_poll(bContext *C, wmOperatorType *ot)
More information about the Bf-blender-cvs
mailing list