Merge branch '2.0.x' into master

This commit is contained in:
derselbst 2019-08-08 19:51:44 +02:00
commit 03511aef3a
2 changed files with 9 additions and 3 deletions

View file

@ -368,8 +368,9 @@ if ( enable-profiling )
DOC "Path to clang-tidy executable" )
if ( CLANG_TIDY )
message ( STATUS "Found clang-tidy" )
set ( CMAKE_C_CLANG_TIDY "clang-tidy" )
message ( STATUS "Found clang-tidy at ${CLANG_TIDY}" )
execute_process ( COMMAND ${CLANG_TIDY} "--version" )
set ( CMAKE_C_CLANG_TIDY ${CLANG_TIDY} )
endif ( CLANG_TIDY )
endif ( CMAKE_VERSION VERSION_GREATER "3.6.0" )

View file

@ -857,6 +857,7 @@ new_fluid_synth(fluid_settings_t *settings)
goto error_recovery;
}
FLUID_MEMSET(synth->channel, 0, synth->midi_channels * sizeof(*synth->channel));
for(i = 0; i < synth->midi_channels; i++)
{
synth->channel[i] = new_fluid_channel(synth, i);
@ -876,6 +877,7 @@ new_fluid_synth(fluid_settings_t *settings)
goto error_recovery;
}
FLUID_MEMSET(synth->voice, 0, synth->nvoice * sizeof(*synth->voice));
for(i = 0; i < synth->nvoice; i++)
{
synth->voice[i] = new_fluid_voice(synth->eventhandler, synth->sample_rate);
@ -1028,7 +1030,10 @@ delete_fluid_synth(fluid_synth_t *synth)
{
for(i = 0; i < synth->midi_channels; i++)
{
fluid_channel_set_preset(synth->channel[i], NULL);
if(synth->channel[i] != NULL)
{
fluid_channel_set_preset(synth->channel[i], NULL);
}
}
}