Fix for bug in raytrace code refactoring, crash with empty octree.

This commit is contained in:
Brecht Van Lommel 2007-08-01 09:49:17 +00:00
parent f1b0f114c7
commit a84c598b35

@ -124,10 +124,13 @@ void makeraytree(Render *re)
}
}
if(min[0] > max[0]) return; /* empty raytree */
re->raytree= RE_ray_tree_create(re->r.ocres, totface, min, max, vlr_face_coords, vlr_check_intersect);
if(min[0] > max[0]) { /* empty raytree */
RE_ray_tree_done(re->raytree);
return;
}
for(v=0; v<re->totvlak; v++) {
if((v & 255)==0) {
double time= PIL_check_seconds_timer();