summaryrefslogtreecommitdiffstats
path: root/src/AlsaDriver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/AlsaDriver.cpp')
-rw-r--r--src/AlsaDriver.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/AlsaDriver.cpp b/src/AlsaDriver.cpp
index f744b5f..56bef22 100644
--- a/src/AlsaDriver.cpp
+++ b/src/AlsaDriver.cpp
@@ -218,10 +218,8 @@ AlsaDriver::create_port(boost::shared_ptr<PatchageModule> parent,
new PatchagePort(parent, ALSA_MIDI, name, is_input,
_app->state_manager()->get_port_color(ALSA_MIDI)));
- boost::shared_ptr<PatchageCanvas> canvas
- = boost::dynamic_pointer_cast<PatchageCanvas>(parent->canvas().lock());
- if (canvas)
- canvas->index_port(PortID(addr, is_input), ret);
+ dynamic_cast<PatchageCanvas*>(parent->canvas())->index_port(
+ PortID(addr, is_input), ret);
ret->alsa_addr(addr);
return ret;