From 95b1e3fe89477fbb6710d30ac183fab7d8238c14 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 29 Sep 2008 17:45:05 +0000 Subject: Fix crash when using ingen -gl to load a patch (because the plugin hasn't arrived at the client yet). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1535 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/gui/NodeModule.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/libs/gui/NodeModule.cpp b/src/libs/gui/NodeModule.cpp index f8308264..97edaa84 100644 --- a/src/libs/gui/NodeModule.cpp +++ b/src/libs/gui/NodeModule.cpp @@ -230,9 +230,9 @@ NodeModule::add_port(SharedPtr port, bool resize_to_fit) { uint32_t index = _ports.size(); // FIXME: kludge, engine needs to tell us this - string name = (App::instance().configuration()->name_style() == Configuration::PATH) - ? port->path().name() - : ((PluginModel*)node()->plugin())->port_human_name(index); + string name = port->path().name(); + if (App::instance().configuration()->name_style() == Configuration::HUMAN && node()->plugin()) + name = ((PluginModel*)node()->plugin())->port_human_name(index); Module::add_port(boost::shared_ptr( new Port(PtrCast(shared_from_this()), port, name))); -- cgit v1.2.1