diff --git a/Polyhedron/demo/Polyhedron/MainWindow.cpp b/Polyhedron/demo/Polyhedron/MainWindow.cpp index 5344f2e6c8d..9fcb2ffb6c9 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.cpp +++ b/Polyhedron/demo/Polyhedron/MainWindow.cpp @@ -2104,6 +2104,8 @@ void MainWindow::insertActionBeforeLoadPlugin(QMenu* menu, QAction* actionToInse void MainWindow::colorItems() { std::size_t nb_files = scene->selectionIndices().size(); + if(nb_files<2) + return; std::vector colors_; colors_.reserve(nb_files); compute_color_map(scene->item(scene->selectionIndices().last())->color(),