Commit 5c0223ed authored by Max Lyon's avatar Max Lyon Committed by Jan Möbius
Browse files

fix crash in OMWriter when writing an empty mesh with colors

(cherry picked from commit d0033f99)
parent 4b543fc0
Pipeline #398 failed with stage
......@@ -248,7 +248,7 @@ bool _OMWriter_::write_binary(std::ostream& _os, BaseExporter& _be,
}
// ---------- write vertex color
if (_opt.check( Options::VertexColor ) && _be.has_vertex_colors() )
if (_be.n_vertices() && _opt.check( Options::VertexColor ) && _be.has_vertex_colors() )
{
Vec3uc c = _be.color(VertexHandle(0));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment