From 6b8241af05a058e1fcb33205357fc405bf82c150 Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Tue, 12 Sep 2023 20:14:03 -0400 Subject: Fix ViewFrame lifetime issues. --- ui/viewframe.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/viewframe.h b/ui/viewframe.h index b835170d..96bf7d98 100644 --- a/ui/viewframe.h +++ b/ui/viewframe.h @@ -370,6 +370,7 @@ class BINARYNINJAUIAPI ViewFrame : public QWidget bool m_graphViewPreferred = false; QStringList m_viewTypePriority; int m_preferredSyncGroup = 1; + bool m_aboutToClose = false; UIActionHandler m_actionHandler; @@ -448,6 +449,8 @@ class BINARYNINJAUIAPI ViewFrame : public QWidget QWidget* getViewWidgetForType(const QString& type); View* getViewForType(const QString& type); + void aboutToClose() { m_aboutToClose = true; } + bool isAboutToClose() { return m_aboutToClose; } bool closeRequest(); void closing(); void clearViewLocation(); -- cgit v1.3.1