diff options
| author | Mason Reed <mason@vector35.com> | 2026-05-26 16:52:30 -0400 |
|---|---|---|
| committer | Mason Reed <35282038+emesare@users.noreply.github.com> | 2026-05-28 14:09:06 -0400 |
| commit | c1a970b68f70d536d8196c07e9163c1ef41ed5c8 (patch) | |
| tree | 1206c3658e2184c6220cf3d05ed9d66bd70f565d | |
| parent | 96d00358954807095418da56421467f2f93dd905 (diff) | |
[WARP] Fix race condition with sidebar deletion with analysis completion event callback
| -rw-r--r-- | plugins/warp/ui/plugin.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/warp/ui/plugin.cpp b/plugins/warp/ui/plugin.cpp index 93900ed9..fad46a98 100644 --- a/plugins/warp/ui/plugin.cpp +++ b/plugins/warp/ui/plugin.cpp @@ -9,6 +9,7 @@ #include <QToolBar> #include <QVBoxLayout> +#include <QtCore/QMetaObject> #include <utility> using namespace BinaryNinja; @@ -170,11 +171,13 @@ WarpSidebarWidget::WarpSidebarWidget(BinaryViewRef data) : SidebarWidget("WARP") this->setLayout(layout); // Do a full update if analysis has been done, otherwise we may persist old data and not have new data. - m_analysisEvent = new AnalysisCompletionEvent(m_data, [this]() { ExecuteOnMainThread([this]() { Update(); }); }); + m_analysisEvent = new AnalysisCompletionEvent(m_data, [this]() { + QMetaObject::invokeMethod(this, [this]() { Update(); }); + }); m_fetcher = WarpFetcher::Global(); m_callbackId = m_fetcher->AddCompletionCallback([this]() { - ExecuteOnMainThread([this]() { + QMetaObject::invokeMethod(this, [this]() { // Instead of doing a full update after fetching, we only want to make sure the current function has // up-to-date matches, since the other two tabs (all matches, container list) do not get populated with // additional information or manage their own updates (e.g. container source list). |
