From 12be8f72f1936bb891ca6175062600ec52de3b5d Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Wed, 3 Jun 2020 03:40:31 +1000 Subject: [PATCH] node: disconnect all parameters before destroying them Fixes a common segfault where destroying a node may ripple a disconnect signal up the graph and trigger something to try to access its (now-destroyed) parameters. --- app/node/node.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/node/node.cpp b/app/node/node.cpp index ece63ac12..45723ea27 100644 --- a/app/node/node.cpp +++ b/app/node/node.cpp @@ -40,6 +40,8 @@ Node::Node() : Node::~Node() { + DisconnectAll(); + // We delete in the Node destructor rather than relying on the QObject system because the parameter may need to // perform actions on this Node object and we want them to be done before the Node object is fully destroyed foreach (NodeParam* param, params_) {