From 6d19d905cfe2fa426c9fd6470fa024255a7b0014 Mon Sep 17 00:00:00 2001 From: MarianoGNU Date: Mon, 20 Jun 2016 19:57:21 -0300 Subject: [PATCH] Don't create outlines from dummy meshes. Fixes #4718 --- tools/editor/plugins/mesh_instance_editor_plugin.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/editor/plugins/mesh_instance_editor_plugin.cpp b/tools/editor/plugins/mesh_instance_editor_plugin.cpp index f604e4c57c3..c952feb1daa 100644 --- a/tools/editor/plugins/mesh_instance_editor_plugin.cpp +++ b/tools/editor/plugins/mesh_instance_editor_plugin.cpp @@ -183,6 +183,12 @@ void MeshInstanceEditor::_create_outline_mesh() { return; } + if (mesh->get_surface_count() == 0) { + err_dialog->set_text(TTR("Mesh has not surface to create outlines from!")); + err_dialog->popup_centered_minsize(); + return; + } + Ref mesho = mesh->create_outline(outline_size->get_val()); if (mesho.is_null()) {