nodeview: only select if a graph is currently active

Fixes segfault where timeline attempted to signal NodeView to select nodes
after it had already cleared itself.
This commit is contained in:
itsmattkc
2020-04-22 18:18:22 +10:00
parent de783d214a
commit 26b928597c
+8
View File
@@ -114,6 +114,10 @@ void NodeView::DeselectAll()
void NodeView::Select(const QList<Node *> &nodes)
{
if (!graph_) {
return;
}
DeselectAll();
foreach (Node* n, nodes) {
@@ -125,6 +129,10 @@ void NodeView::Select(const QList<Node *> &nodes)
void NodeView::SelectWithDependencies(QList<Node *> nodes)
{
if (!graph_) {
return;
}
int original_length = nodes.size();
for (int i=0;i<original_length;i++) {
nodes.append(nodes.at(i)->GetDependencies());