From cc1b89fe1dce636688a9408a45671f9df2114891 Mon Sep 17 00:00:00 2001 From: WarmUpTill <19472752+WarmUpTill@users.noreply.github.com> Date: Sat, 22 Nov 2025 07:23:17 +0100 Subject: [PATCH] Fix crash on macro tab setup --- lib/macro/macro-tab.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/macro/macro-tab.cpp b/lib/macro/macro-tab.cpp index 452119d0..2cc3e5a7 100644 --- a/lib/macro/macro-tab.cpp +++ b/lib/macro/macro-tab.cpp @@ -615,17 +615,20 @@ setupToolBar(const std::initializer_list> auto toolbar = new QToolBar(); toolbar->setIconSize({16, 16}); - QAction *lastSeperator = nullptr; + QAction *lastSeparator = nullptr; for (const auto &widgetGroup : widgetGroups) { for (const auto &widget : widgetGroup) { + if (!widget) { + continue; + } toolbar->addWidget(widget); } - lastSeperator = toolbar->addSeparator(); + lastSeparator = toolbar->addSeparator(); } - if (lastSeperator) { - toolbar->removeAction(lastSeperator); + if (lastSeparator) { + toolbar->removeAction(lastSeparator); } // Prevent "extension" button from showing up