diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-09-06 16:56:01 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-09-06 17:17:18 +0300 |
commit | 4d8980a690e87306c3ae2ca8b5fc0b78f025740f (patch) | |
tree | abd36c4dc007f6f923a66499e77d53e9ccd1bb6e /source/blender/blenloader | |
parent | 584523e0adeb2663077602953f0d3288c4c60fe4 (diff) |
Fix T52640: crash when opening image file browser in some cases.
There was some invalid state in the screen here, some areas had
sa->full set even though no screen was maximized, which then caused
a restore from the wrong (empty) area, which then led to spacedata
being empty and a crash.
This fix properly clears the sa->full after restore, and also fixes
existing .blend files in such an invalid state.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index ba985ef5086..f87d04fa0a3 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -1671,6 +1671,17 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) CustomData_set_layer_name(&me->vdata, CD_MDEFORMVERT, 0, ""); } } + + { + /* Fix for invalid state of screen due to bug in older versions. */ + for (bScreen *sc = main->screen.first; sc; sc = sc->id.next) { + for (ScrArea *sa = sc->areabase.first; sa; sa = sa->next) { + if(sa->full && sc->state == SCREENNORMAL) { + sa->full = NULL; + } + } + } + } } void do_versions_after_linking_270(Main *main) |