summaryrefslogtreecommitdiffstats
path: root/src/libs/gui/NodeModule.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-09-29 17:45:05 +0000
committerDavid Robillard <d@drobilla.net>2008-09-29 17:45:05 +0000
commit95b1e3fe89477fbb6710d30ac183fab7d8238c14 (patch)
tree9a2b824b6e313b9061e2374844a68b71331084d4 /src/libs/gui/NodeModule.cpp
parent8ef6955d43a441a5873abaa27049041dea18f79e (diff)
downloadingen-95b1e3fe89477fbb6710d30ac183fab7d8238c14.tar.gz
ingen-95b1e3fe89477fbb6710d30ac183fab7d8238c14.tar.bz2
ingen-95b1e3fe89477fbb6710d30ac183fab7d8238c14.zip
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
Diffstat (limited to 'src/libs/gui/NodeModule.cpp')
-rw-r--r--src/libs/gui/NodeModule.cpp6
1 files changed, 3 insertions, 3 deletions
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<PortModel> 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<Port>(
new Port(PtrCast<NodeModule>(shared_from_this()), port, name)));