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.
This commit is contained in:
parent
e95732bced
commit
1c3b2c58af
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue