[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44097] trunk/blender/source/blender/ editors/interface/interface_regions.c: Fix #30155: crash with popup menu open while new .blend file is loaded,
Brecht Van Lommel
brechtvanlommel at pandora.be
Mon Feb 13 22:05:09 CET 2012
Revision: 44097
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44097
Author: blendix
Date: 2012-02-13 21:05:04 +0000 (Mon, 13 Feb 2012)
Log Message:
-----------
Fix #30155: crash with popup menu open while new .blend file is loaded,
CTX_wm_window is then set to NULL and checked in the event queue, but it
should be checked for removing handlers too.
Modified Paths:
--------------
trunk/blender/source/blender/editors/interface/interface_regions.c
Modified: trunk/blender/source/blender/editors/interface/interface_regions.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_regions.c 2012-02-13 20:54:36 UTC (rev 44096)
+++ trunk/blender/source/blender/editors/interface/interface_regions.c 2012-02-13 21:05:04 UTC (rev 44097)
@@ -2657,8 +2657,13 @@
void uiPupBlockClose(bContext *C, uiBlock *block)
{
if(block->handle) {
- UI_remove_popup_handlers(&CTX_wm_window(C)->modalhandlers, block->handle);
- ui_popup_block_free(C, block->handle);
+ wmWindow *win = CTX_wm_window(C);
+
+ /* if loading new .blend while popup is open, window will be NULL */
+ if(win) {
+ UI_remove_popup_handlers(&win->modalhandlers, block->handle);
+ ui_popup_block_free(C, block->handle);
+ }
}
}
More information about the Bf-blender-cvs
mailing list