From 4ec35e15ea750d4441bc8b14ad0de14958755e75 Mon Sep 17 00:00:00 2001 From: anatol Date: Wed, 6 Dec 2023 19:18:52 +0200 Subject: [PATCH] fixed crash --- wallet/core/contracts/shaders_manager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wallet/core/contracts/shaders_manager.cpp b/wallet/core/contracts/shaders_manager.cpp index 7f1bed55b..678469aef 100644 --- a/wallet/core/contracts/shaders_manager.cpp +++ b/wallet/core/contracts/shaders_manager.cpp @@ -300,9 +300,10 @@ namespace beam::wallet { StartRun(method); }); - m_Wallet.DoInSyncedWallet([this]() + m_Wallet.DoInSyncedWallet([wp = std::weak_ptr(_startEvent)]() { - _startEvent->post(); + if (auto sp = wp.lock()) + sp->post(); }); }