Fix for crash happening on blender exit after the bake

The issue is caused by 1a79abdad, and annoyingly it's a regression
since 2.69, so if we do 'a', this commit should be ported there.
This commit is contained in:
Sergey Sharybin 2014-03-20 13:15:27 +06:00
parent e02b9c8a45
commit efb48fcbbb

@ -5868,7 +5868,9 @@ void RE_Database_Baking(Render *re, Main *bmain, Scene *scene, unsigned int lay,
re->lay= lay;
/* renderdata setup and exceptions */
re->r= scene->r;
BLI_freelistN(&re->r.layers);
re->r = scene->r;
BLI_duplicatelist(&re->r.layers, &scene->r.layers);
RE_init_threadcount(re);