From cf4220570c2d1b7105fb29719383f64026d46837 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Fri, 27 Jan 2023 18:53:27 -0500 Subject: Add virtual non-inline functions for interface classes This fixes a cases where trying to dynamic_cast to one of these interfaces fails for types defined in libraries, since the linker just copies the full definition into the library because it can, and then breaks the inheritance tree. --- ui/xreflist.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui/xreflist.h') diff --git a/ui/xreflist.h b/ui/xreflist.h index 112573ee..9d9b5983 100644 --- a/ui/xreflist.h +++ b/ui/xreflist.h @@ -119,7 +119,7 @@ class XrefHeader : public XrefItem public: XrefHeader(); XrefHeader(const QString& name, XrefItem::XrefType type, XrefHeader* parent, FunctionRef func); - virtual ~XrefHeader() {} + virtual ~XrefHeader(); virtual QString name() const { return m_name; } XrefItem::XrefType type() const { return m_type; } @@ -468,7 +468,7 @@ class BINARYNINJAUIAPI CrossReferenceContainer public: CrossReferenceContainer(CrossReferenceWidget* parent, ViewFrame* view, BinaryViewRef data); - virtual ~CrossReferenceContainer() {} + virtual ~CrossReferenceContainer(); virtual QModelIndex translateIndex(const QModelIndex& idx) const = 0; virtual bool getReference(const QModelIndex& idx, XrefItem** refPtr) const = 0; virtual QModelIndex nextIndex() = 0; -- cgit v1.3.1