From a759492f1e64e47b073511bd032b1b124fbf00d4 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Wed, 2 Nov 2022 23:08:47 +0100 Subject: [PATCH] Avoid an assertion in macro editor when no script support is compiled in --- src/lay/lay/layMacroController.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lay/lay/layMacroController.cc b/src/lay/lay/layMacroController.cc index 51b1111ef..41167c001 100644 --- a/src/lay/lay/layMacroController.cc +++ b/src/lay/lay/layMacroController.cc @@ -328,6 +328,10 @@ MacroController::drop_url (const std::string &path_or_url) void MacroController::show_editor (const std::string &cat, bool force_add) { + if (macro_categories ().empty ()) { + throw tl::Exception (tl::to_string (QObject::tr ("Application has not been compiled with scripting support - no macro IDE available"))); + } + if (mp_macro_editor) { mp_macro_editor->show (cat, force_add); }