diff --git a/libs/pbd/pbd/destructible.h b/libs/pbd/pbd/destructible.h index 8acbed05e2..804f32fedc 100644 --- a/libs/pbd/pbd/destructible.h +++ b/libs/pbd/pbd/destructible.h @@ -25,8 +25,7 @@ namespace PBD { class LIBPBD_API Destructible { - public: - Destructible() {} +public: virtual ~Destructible () { Destroyed(); } PBD::Signal0 Destroyed; diff --git a/libs/pbd/pbd/statefuldestructible.h b/libs/pbd/pbd/statefuldestructible.h index d2cf87db10..274457c88f 100644 --- a/libs/pbd/pbd/statefuldestructible.h +++ b/libs/pbd/pbd/statefuldestructible.h @@ -26,7 +26,7 @@ namespace PBD { /** Base class for objects with saveable and undoable state with destruction notification */ -class LIBPBD_API StatefulDestructible : public Stateful, public Destructible +class LIBPBD_API StatefulDestructible : public Stateful, virtual public Destructible { };