summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libs/gui/WindowFactory.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/gui/WindowFactory.cpp b/src/libs/gui/WindowFactory.cpp
index 92b73962..a20b8fc9 100644
--- a/src/libs/gui/WindowFactory.cpp
+++ b/src/libs/gui/WindowFactory.cpp
@@ -224,7 +224,7 @@ NodeControlWindow*
WindowFactory::new_control_window(SharedPtr<NodeModel> node)
{
uint32_t poly = 1;
- if (node->polyphonic())
+ if (node->polyphonic() && node->parent())
poly = ((PatchModel*)node->parent().get())->poly();
NodeControlWindow* win = new NodeControlWindow(node, poly);