From 6748017857663595213790868252312834119017 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Wed, 7 Feb 2024 16:56:03 -0500 Subject: Debug warn on starting a BackgroundThread with no owner --- ui/progresstask.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ui/progresstask.h') diff --git a/ui/progresstask.h b/ui/progresstask.h index 1676cabd..c8b094c9 100644 --- a/ui/progresstask.h +++ b/ui/progresstask.h @@ -445,6 +445,10 @@ class BINARYNINJAUIAPI BackgroundThread : public QObject */ void start(QVariant init = QVariant()) { + if (!m_hasOwner || m_owner.isNull()) + { + BinaryNinja::LogDebug("Starting background thread with no owning object. This is technically allowed but it might outlive any UIs it changes."); + } if (m_then.empty() && m_catch.empty() && m_finally.empty()) { std::unique_lock lock(m_finishLock); -- cgit v1.3.1