Mixer: Don't segfault when removing a module.

This commit is contained in:
Jonathan Moore Liles 2012-02-07 19:39:27 -08:00
parent 36194c955a
commit 72073030a7
1 changed files with 3 additions and 1 deletions

View File

@ -326,7 +326,9 @@ Mixer_Strip::handle_module_added ( Module *m )
void void
Mixer_Strip::handle_module_removed ( Module *m ) Mixer_Strip::handle_module_removed ( Module *m )
{ {
if ( spatialization_controller->control_output[0].connected_port()->module() == m )
if ( spatialization_controller->control_output[0].connected() &&
spatialization_controller->control_output[0].connected_port()->module() == m )
{ {
spatialization_controller->hide(); spatialization_controller->hide();
DMESSAGE( "Module \"%s\" disconnected from spatialization controller", m->name() ); DMESSAGE( "Module \"%s\" disconnected from spatialization controller", m->name() );