Fix crash reading old userpref.blend

While window manager is supposed to exist after file was fully read
and do-versioned, we can not rely on window manager to exist while
reading file and setting up an environment.
This commit is contained in:
Sergey Sharybin 2018-04-23 11:45:40 +02:00
parent 63c4654135
commit fdf5834b44

@ -654,6 +654,7 @@ void do_versions_after_linking_280(Main *main)
/* SpaceTime & SpaceLogic removal/replacing */ /* SpaceTime & SpaceLogic removal/replacing */
if (!MAIN_VERSION_ATLEAST(main, 280, 9)) { if (!MAIN_VERSION_ATLEAST(main, 280, 9)) {
const wmWindowManager *wm = main->wm.first; const wmWindowManager *wm = main->wm.first;
if (wm != NULL) {
const Scene *scene = main->scene.first; const Scene *scene = main->scene.first;
/* Action editors need a scene for creation. First, update active /* Action editors need a scene for creation. First, update active
@ -685,6 +686,7 @@ void do_versions_after_linking_280(Main *main)
} }
} }
} }
}
static void do_version_layer_collections_idproperties(ListBase *lb) static void do_version_layer_collections_idproperties(ListBase *lb)
{ {