build system revision
[carveJwlIkooP6JGAAIwe30JlM.git] / bvh.h
diff --git a/bvh.h b/bvh.h
index b04c3de2b95f38342259a85d54386854ce295488..ced346e31af59d3d1bad6af58e890b6629a413dc 100644 (file)
--- a/bvh.h
+++ b/bvh.h
@@ -164,7 +164,8 @@ static void bh_subdivide( bh_tree *bh, u32 inode ){
 
 static bh_tree *bh_create( void *lin_alloc, bh_system *system, 
                               void *user, u32 item_count, u32 max_per_leaf ){
-   assert( max_per_leaf > 0 );
+   if( max_per_leaf == 0 )
+      vg_fatal_error( "Minimum of 1 per leaf\n" );
 
    u32 alloc_count = VG_MAX( 1, item_count );