From 700e75a2b58f0f2d86b59984d5a0b6fd1c7fc1ee Mon Sep 17 00:00:00 2001 From: WarmUpTill Date: Mon, 22 Aug 2022 20:34:39 +0200 Subject: [PATCH] Fix potential crashes when removing macros --- src/macro-core/macro-tab.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/macro-core/macro-tab.cpp b/src/macro-core/macro-tab.cpp index adad23db..b8a48fda 100644 --- a/src/macro-core/macro-tab.cpp +++ b/src/macro-core/macro-tab.cpp @@ -106,7 +106,7 @@ void AdvSceneSwitcher::on_macroRemove_clicked() std::lock_guard lock(switcher->m); switcher->abortMacroWait = true; switcher->macroWaitCv.notify_all(); - QString::fromStdString(switcher->macros[idx]->Name()); + name = QString::fromStdString(switcher->macros[idx]->Name()); switcher->macros.erase(switcher->macros.begin() + idx); for (auto &m : switcher->macros) { m->ResolveMacroRef();