diff options
author | Ton Roosendaal <ton@blender.org> | 2004-04-14 16:52:35 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-04-14 16:52:35 +0400 |
commit | 7dc152b01a6b77a840e916ecbf5fa34c3a6ab2a8 (patch) | |
tree | ec8a41d19e323b839cb034f24587fbea33aa4361 | |
parent | a96869198bce7187eeb51fb57b1b02471ab985f9 (diff) |
Solved crash caused by referencing NULL ->camera pointer in preview for
World shading buttons.
Thanks Goofster for reporting it!
-rw-r--r-- | source/blender/src/previewrender.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/src/previewrender.c b/source/blender/src/previewrender.c index 9621c3f2faa..4bfe5265f27 100644 --- a/source/blender/src/previewrender.c +++ b/source/blender/src/previewrender.c @@ -1081,12 +1081,12 @@ void BIF_previewrender(SpaceButs *sbuts) lens= 35.0; if(G.scene->camera) { lens= ( (Camera *)G.scene->camera->data)->lens; - } - /* needed for init_render_world */ - MTC_Mat4CpyMat4(R.viewinv, G.scene->camera->obmat); - MTC_Mat4Ortho(R.viewinv); - MTC_Mat4Invert(R.viewmat, R.viewinv); + /* needed for init_render_world */ + MTC_Mat4CpyMat4(R.viewinv, G.scene->camera->obmat); + MTC_Mat4Ortho(R.viewinv); + MTC_Mat4Invert(R.viewmat, R.viewinv); + } init_render_world(); init_render_textures(); /* dont do it twice!! (brightness) */ } |