From f7ccc8fa61e20d17f0a52edada68445e6353258a Mon Sep 17 00:00:00 2001 From: panquez Date: Thu, 9 Jan 2020 14:44:46 +0100 Subject: [PATCH] fix(SVGInput): fix bug when loading a .svg with a z-ending last path --- src/geode/model/svg_input.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/geode/model/svg_input.cpp b/src/geode/model/svg_input.cpp index 105e5af0..90de6df4 100644 --- a/src/geode/model/svg_input.cpp +++ b/src/geode/model/svg_input.cpp @@ -335,6 +335,10 @@ namespace void create_line( const std::vector< geode::Point2D >& vertices ) { + if( vertices.size() < 2 ) + { + return; + } const auto& line_id = builder_.add_line(); const auto line_builder = builder_.line_mesh_builder( line_id ); line_builder->create_point( vertices.front() );