Fix potential crashes when removing macros

This commit is contained in:
WarmUpTill
2022-08-22 20:34:39 +02:00
committed by WarmUpTill
parent 19e79aff50
commit 700e75a2b5

View File

@@ -106,7 +106,7 @@ void AdvSceneSwitcher::on_macroRemove_clicked()
std::lock_guard<std::mutex> 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();