diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-03-06 16:22:00 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-03-06 16:22:00 +0300 |
commit | 1c3b2c58af923a05f24ac114aa208737111ddc25 (patch) | |
tree | ebbc3f3971e5013106b0bae4bd34be402ee75404 /source | |
parent | e95732bced280562be92aeb4d82d0eefb58cb06c (diff) |
Fix issue reported on irc by Sebastian, crash when undoing and changing
screen.
Apparently the screen on the given file did not have a scene attached.
Not sure how this is possible exactly, but for now just guard against it
at load time by assigning default scene in that case.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 69e0613a2ac..ceccb7387da 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5838,6 +5838,12 @@ static void lib_link_screen(FileData *fd, Main *main) if (sc->id.flag & LIB_NEED_LINK) { sc->id.us = 1; sc->scene = newlibadr(fd, sc->id.lib, sc->scene); + + /* this should not happen, but apparently it does somehow. Until we figure out the cause, + * just assign first available scene */ + if (!sc->scene) + sc->scene = main->scene.first; + sc->animtimer = NULL; /* saved in rare cases */ for (sa = sc->areabase.first; sa; sa = sa->next) { |