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.
This commit is contained in:
itsmattkc
2020-06-03 03:40:31 +10:00
parent fb5c06db50
commit 12be8f72f1
+2
View File
@@ -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_) {