summaryrefslogtreecommitdiff
path: root/ui/progresstask.h
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2024-02-07 16:56:03 -0500
committerGlenn Smith <glenn@vector35.com>2024-02-07 17:23:56 -0500
commit6748017857663595213790868252312834119017 (patch)
tree66e7f342520597bec10daecdadb7159ed2ee2fa8 /ui/progresstask.h
parent1395618054638709642086781284771929892358 (diff)
Debug warn on starting a BackgroundThread with no owner
Diffstat (limited to 'ui/progresstask.h')
-rw-r--r--ui/progresstask.h4
1 files changed, 4 insertions, 0 deletions
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);