Prevent crash when trying to add Aux before input

pull/147/head
Adam Avramov 2014-12-09 02:22:07 +02:00
parent e230929a57
commit 322276474a
1 changed files with 7 additions and 0 deletions

View File

@ -808,6 +808,13 @@ Module::insert_menu_cb ( const Fl_Menu_ *m )
if ( !strcmp( picked, "Aux" ) )
{
if ( ninputs() == 0 )
{
fl_alert( "Cannot insert this module at this point in the chain" );
return;
}
int n = 0;
for ( int i = 0; i < chain()->modules(); i++ )
{