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:
authorCampbell Barton <ideasman42@gmail.com>2015-06-08 08:57:42 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-06-08 09:02:57 +0300
commitb54e95a5c8dcb7eae1059af107a7cdfa028d7e2e (patch)
tree9f2f977f16f8dbd52d490f0acbba4b4a53a1b155 /source/blender/editors/interface/interface_regions.c
parent22a4fcb146c73ec922d959a33774f5a83cad4adb (diff)
Alternative fix copying windows from popup dialogs
It could still crash if the window was freed and another was activated. see T44688.
Diffstat (limited to 'source/blender/editors/interface/interface_regions.c')
-rw-r--r--source/blender/editors/interface/interface_regions.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 9835f0885b6..da2852c71d1 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -3049,16 +3049,11 @@ void uiPupBlockOperator(bContext *C, uiBlockCreateFunc func, wmOperator *op, int
}
#endif
-void UI_popup_block_close(bContext *C, uiBlock *block)
+void UI_popup_block_close(bContext *C, wmWindow *win, uiBlock *block)
{
- wmWindow *win = CTX_wm_window(C);
-
- /* check window before 'block->handle' incase the
- * popup execution closed the window and freed the block. see T44688. */
-
/* if loading new .blend while popup is open, window will be NULL */
- if (win) {
- if (block->handle) {
+ if (block->handle) {
+ if (win) {
UI_popup_handlers_remove(&win->modalhandlers, block->handle);
ui_popup_block_free(C, block->handle);
}