From 819eb884826cd9696f34309f8253be2a8819b942 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 14 Aug 2008 00:29:22 +0000 Subject: Fix crash when showing control window for root patch. git-svn-id: http://svn.drobilla.net/lad/ingen@1362 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/gui/WindowFactory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 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); -- cgit v1.2.1