diff options
author | julianeisel <julian_eisel@web.de> | 2015-01-14 03:29:17 +0300 |
---|---|---|
committer | julianeisel <julian_eisel@web.de> | 2015-01-14 03:29:17 +0300 |
commit | f19013158ab51dd8a9ed7a0121c2858c310f8286 (patch) | |
tree | 8a91133e61bb40091295405f6a569f69f9a936fb /source/blender/editors/screen | |
parent | 3d503ea8d6fa8ff397565b90cb53a4e211aef847 (diff) |
Workaround/Fix T43139: Calling bpy.ops.screen.screen_full_area() multiple times in python console causes Blender to crash
This was sort of a chicken<->egg dilemma, because after a maximized screen was restored, the screen handling used region
coordinates which weren't updated yet. I'm still not sure why, but this resulted in area coords that go beond INT_MAX.
To fix this I made sure the first screen handling after restoring a maximized screen is skipped, so that it's delayed to
the next call of wm_event_do_handlers (since this is called from main loop there shouldn't be a noticable delay or any
handling glitches).
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 3f814084238..3972d00293c 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1881,6 +1881,11 @@ ScrArea *ED_screen_state_toggle(bContext *C, wmWindow *win, ScrArea *sa, const s BKE_screen_free(oldscreen); BKE_libblock_free(CTX_data_main(C), oldscreen); + /* After we've restored back to SCREENNORMAL, we have to wait with + * screen handling as it uses the area coords which aren't updated yet. + * Without doing so, the screen handling gets wrong area coords, + * which in worst case can lead to crashes (see T43139) */ + sc->skip_handling = true; } else { /* change from SCREENNORMAL to new state */ |