From 7bb1c768d1c7d546f1812a33ffaf0f40620046c7 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Thu, 11 May 2006 09:53:46 +0000 Subject: Added extra pointer check in "save envmap", which can crash when using the option without rendered envmap. Fixes bug #4166 --- source/blender/src/writeimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/src/writeimage.c') diff --git a/source/blender/src/writeimage.c b/source/blender/src/writeimage.c index a1578bd0dec..8e3abd06a72 100644 --- a/source/blender/src/writeimage.c +++ b/source/blender/src/writeimage.c @@ -66,7 +66,7 @@ void BIF_save_envmap(EnvMap *env, char *str) int dx; /* all interactive stuff is handled in buttons.c */ - if(env->cube[0]->ibuf==NULL) return; + if(env->cube[0]==NULL || env->cube[0]->ibuf==NULL) return; dx= env->cube[0]->ibuf->x; ibuf= IMB_allocImBuf(3*dx, 2*dx, 24, IB_rect, 0); -- cgit v1.2.3