[Bf-blender-cvs] [1c3b2c5] master: Fix issue reported on irc by Sebastian, crash when undoing and changing screen.
Antony Riakiotakis
noreply at git.blender.org
Fri Mar 6 14:22:08 CET 2015
Commit: 1c3b2c58af923a05f24ac114aa208737111ddc25
Author: Antony Riakiotakis
Date: Fri Mar 6 14:22:00 2015 +0100
Branches: master
https://developer.blender.org/rB1c3b2c58af923a05f24ac114aa208737111ddc25
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.
===================================================================
M source/blender/blenloader/intern/readfile.c
===================================================================
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 69e0613..ceccb73 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) {
More information about the Bf-blender-cvs
mailing list