diff --git a/source/blender/src/writeimage.c b/source/blender/src/writeimage.c index 40160c42367..f386ea3ecf0 100644 --- a/source/blender/src/writeimage.c +++ b/source/blender/src/writeimage.c @@ -100,8 +100,9 @@ void BIF_save_envmap(EnvMap *env, char *str) int dx; /* all interactive stuff is handled in buttons.c */ - - dx= (env->cuberes * R.r.size) / 100; + if(env->cube[0]->ibuf==NULL) return; + + dx= env->cube[0]->ibuf->x; ibuf= IMB_allocImBuf(3*dx, 2*dx, 24, IB_rect, 0); IMB_rectop(ibuf, env->cube[0]->ibuf,