diff --git a/zenovis/xinxinoptix/optixPathTracer.cpp b/zenovis/xinxinoptix/optixPathTracer.cpp index fe9d636332..37cb95cfb7 100644 --- a/zenovis/xinxinoptix/optixPathTracer.cpp +++ b/zenovis/xinxinoptix/optixPathTracer.cpp @@ -2521,7 +2521,7 @@ static void updateStaticDrawObjects() { auto& dat = *dat_ptr; - std::vector global_matidx(dat.mtlidList.size()); + std::vector global_matidx(max(dat.mtlidList.size(), 1ull)); for (size_t j=0; j(); mesh->resize(dat.tris.size()/3, dat.verts.size()/3); - std::vector global_matidx(max(dat.mtlidList.size(), 1)); + std::vector global_matidx(max(dat.mtlidList.size(), 1ull)); for (size_t j=0; j global_matidx(dat.mtlidList.size()); + std::vector global_matidx(max(dat.mtlidList.size(), 1ull)); for (size_t j=0; j