diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-04-30 17:47:25 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-04-30 17:47:25 +0400 |
commit | d2218cb7f3189c66fc9b197a0481eed794e9e8e6 (patch) | |
tree | d3791c349dd2f9b9985a122919ec28425f33202c | |
parent | dfa69dad3a694122ff7efb6a5cca70c92e37255a (diff) |
Fix one more crash introduced with r36384: trying to bake resulted in a segfault
Also, use tabs for indentation in previous fix for the same crash
-rw-r--r-- | source/blender/render/intern/source/convertblender.c | 4 | ||||
-rw-r--r-- | source/blender/render/intern/source/pipeline.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index 9d96bd756df..74ce7957dd7 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -5659,7 +5659,7 @@ void RE_Database_FromScene_Vectors(Render *re, Main *bmain, Scene *sce, unsigned */ void RE_Database_Baking(Render *re, Main *bmain, Scene *scene, unsigned int lay, int type, Object *actob) { - Object *camera= RE_GetCamera(re); + Object *camera; float mat[4][4]; float amb[3]; int onlyselected, nolamps; @@ -5701,6 +5701,8 @@ void RE_Database_Baking(Render *re, Main *bmain, Scene *scene, unsigned int lay, if(re->lay & 0xFF000000) lay &= 0xFF000000; + camera= RE_GetCamera(re); + /* if no camera, set unit */ if(camera) { normalize_m4(camera->obmat); diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 07b9657b5fe..436f0ecd997 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -3149,7 +3149,7 @@ void RE_PreviewRender(Render *re, Main *bmain, Scene *sce) re->scene = sce; re->lay = sce->lay; - camera = RE_GetCamera(re); + camera = RE_GetCamera(re); RE_SetCamera(re, camera); do_render_3d(re); |