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-05-28 11:43:49 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-05-28 11:46:15 +0300
commitd9b67685210275a71bd22b4f8c35590bf795eb47 (patch)
treed370df88d5e6be34cf1ff0bddb6c5033d3eb9399 /source/blender/windowmanager/intern
parentf3161c97a6eea885a9f162599d42d7ca85e2cfe3 (diff)
Fix T44688: Stereo3D time-sequential crashes
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r--source/blender/windowmanager/intern/wm_stereo.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_stereo.c b/source/blender/windowmanager/intern/wm_stereo.c
index 717583f69ba..60863515dd1 100644
--- a/source/blender/windowmanager/intern/wm_stereo.c
+++ b/source/blender/windowmanager/intern/wm_stereo.c
@@ -452,6 +452,7 @@ int wm_stereo3d_set_exec(bContext *C, wmOperator *op)
const bool is_fullscreen = WM_window_is_fullscreen(win);
char prev_display_mode = win->stereo3d_format->display_mode;
Stereo3dData *s3dd;
+ bool ok = true;
if (G.background)
return OPERATOR_CANCELLED;
@@ -475,6 +476,7 @@ int wm_stereo3d_set_exec(bContext *C, wmOperator *op)
else {
BKE_report(op->reports, RPT_ERROR,
"Failed to create a window without quad-buffer support, you may experience flickering");
+ ok = false;
}
}
else if (win->stereo3d_format->display_mode == S3D_DISPLAY_PAGEFLIP) {
@@ -489,12 +491,14 @@ int wm_stereo3d_set_exec(bContext *C, wmOperator *op)
wm_window_close(C, wm, win_new);
win->stereo3d_format->display_mode = prev_display_mode;
BKE_report(op->reports, RPT_ERROR, "Quad-buffer not supported by the system");
+ ok = false;
}
}
else {
+ win->stereo3d_format->display_mode = prev_display_mode;
BKE_report(op->reports, RPT_ERROR,
"Failed to create a window compatible with the time sequential display method");
- win->stereo3d_format->display_mode = prev_display_mode;
+ ok = false;
}
}
@@ -506,8 +510,15 @@ int wm_stereo3d_set_exec(bContext *C, wmOperator *op)
MEM_freeN(op->customdata);
- WM_event_add_notifier(C, NC_WINDOW, NULL);
- return OPERATOR_FINISHED;
+ if (ok) {
+ WM_event_add_notifier(C, NC_WINDOW, NULL);
+ return OPERATOR_FINISHED;
+ }
+ else {
+ /* without this, the popup won't be freed freed properly T44688 */
+ CTX_wm_window_set(C, win);
+ return OPERATOR_CANCELLED;
+ }
}
int wm_stereo3d_set_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))