fixed a crash introduced in r36384
authorM.G. Kishalmi <lmg@kishalmi.net>
Sat, 30 Apr 2011 10:02:23 +0000 (10:02 +0000)
committerM.G. Kishalmi <lmg@kishalmi.net>
Sat, 30 Apr 2011 10:02:23 +0000 (10:02 +0000)
where the preview render was calling getCam before setting the scene.

source/blender/render/intern/source/pipeline.c

index 1a33a1abb8dd1eb7f8af4f49566fce2cb153dd20..07b9657b5fe5201afd4c171a2222bfbe10a0df7e 100644 (file)
@@ -3137,7 +3137,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri
 
 void RE_PreviewRender(Render *re, Main *bmain, Scene *sce)
 {
-       Object *camera= RE_GetCamera(re);
+       Object *camera;
        int winx, winy;
 
        winx= (sce->r.size*sce->r.xsch)/100;
@@ -3149,6 +3149,7 @@ void RE_PreviewRender(Render *re, Main *bmain, Scene *sce)
        re->scene = sce;
        re->lay = sce->lay;
 
+    camera = RE_GetCamera(re);
        RE_SetCamera(re, camera);
 
        do_render_3d(re);