mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 06:41:41 +00:00
- Fixed a crash in DUMB when loading invalid files.
SVN r1457 (trunk)
This commit is contained in:
parent
74642ca626
commit
f4929133d7
1 changed files with 8 additions and 0 deletions
|
@ -3985,6 +3985,7 @@ static int process_tick(DUMB_IT_SIGRENDERER *sigrenderer)
|
|||
|
||||
process_all_playing(sigrenderer);
|
||||
|
||||
if (sigrenderer->tempo > 0)
|
||||
{
|
||||
LONG_LONG t = sigrenderer->sub_time_left + ((LONG_LONG)TICK_TIME_DIVIDEND << 16) / sigrenderer->tempo;
|
||||
sigrenderer->time_left += (int)(t >> 16);
|
||||
|
@ -4791,6 +4792,13 @@ static DUMB_IT_SIGRENDERER *init_sigrenderer(DUMB_IT_SIGDATA *sigdata, int n_cha
|
|||
sigrenderer->ramp_style = 0;
|
||||
sigrenderer->globalvolume = sigdata->global_volume;
|
||||
sigrenderer->tempo = sigdata->tempo;
|
||||
if (sigrenderer->tempo == 0)
|
||||
{
|
||||
free(callbacks);
|
||||
dumb_destroy_click_remover_array(n_channels, cr);
|
||||
free(sigrenderer);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < DUMB_IT_N_CHANNELS; i++) {
|
||||
IT_CHANNEL *channel = &sigrenderer->channel[i];
|
||||
|
|
Loading…
Reference in a new issue