Fix for [#19793] Resolution Sliding Crashes Blender 2.5 SVN 24256

This commit is contained in:
Matt Ebb
2009-11-05 04:07:58 +00:00
parent 38f7839218
commit 539a68f6c0

View File

@@ -622,6 +622,11 @@ void vol_precache_objectinstance_threads(Render *re, ObjectInstanceRen *obi, Mat
vp->data_r = MEM_callocN(sizeof(float)*vp->res[0]*vp->res[1]*vp->res[2], "volume light cache data red channel");
vp->data_g = MEM_callocN(sizeof(float)*vp->res[0]*vp->res[1]*vp->res[2], "volume light cache data green channel");
vp->data_b = MEM_callocN(sizeof(float)*vp->res[0]*vp->res[1]*vp->res[2], "volume light cache data blue channel");
if (vp->data_r==0 || vp->data_g==0 || vp->data_b==0) {
MEM_freeN(vp);
vp = NULL;
return;
}
obi->volume_precache = vp;
/* Need a shadeinput to calculate scattering */