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:
@@ -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_) {
|
||||
|
||||
Reference in New Issue
Block a user