0
0
mirror of https://github.com/vim/vim.git synced 2025-10-01 04:54:07 -04:00

patch 8.1.1851: crash when sound_playfile() callback plays sound

Problem:    Crash when sound_playfile() callback plays sound.
Solution:   Invoke callback later from event loop.
This commit is contained in:
Bram Moolenaar
2019-08-15 23:05:49 +02:00
parent 5dd143e223
commit 28e67e0c14
9 changed files with 127 additions and 20 deletions

View File

@@ -7692,8 +7692,12 @@ do_sleep(long msec)
}
#endif
#ifdef FEAT_JOB_CHANNEL
if (has_any_channel() && wait_now > 100L)
wait_now = 100L;
if (has_any_channel() && wait_now > 20L)
wait_now = 20L;
#endif
#ifdef FEAT_SOUND
if (has_any_sound_callback() && wait_now > 20L)
wait_now = 20L;
#endif
ui_delay(wait_now, TRUE);
#ifdef FEAT_JOB_CHANNEL