diff --git a/src/slic3r/GUI/OptionsGroup.hpp b/src/slic3r/GUI/OptionsGroup.hpp index 6647740dd..67c3fbdbd 100644 --- a/src/slic3r/GUI/OptionsGroup.hpp +++ b/src/slic3r/GUI/OptionsGroup.hpp @@ -181,6 +181,8 @@ public: // we have to set same max contrtol width to all of them void set_max_win_width(int max_win_width); + bool is_activated() { return sizer != nullptr; } + protected: std::map m_options; wxWindow* m_parent {nullptr}; diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 5d76054e5..f5fb4f82c 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -3933,6 +3933,8 @@ bool Tab::validate_custom_gcodes() bool valid = true; for (auto opt_group : m_active_page->m_optgroups) { assert(opt_group->opt_map().size() == 1); + if (!opt_group->is_activated()) + break; std::string key = opt_group->opt_map().begin()->first; valid &= validate_custom_gcode(opt_group->title, boost::any_cast(opt_group->get_value(key))); if (!valid)