diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-08-15 23:05:49 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-08-15 23:05:49 +0200 |
commit | 28e67e0c1496b7bb166a0acfb176690f219101ca (patch) | |
tree | b30fcbc9fd72f4aed6135478113fcd6dadf37912 /src/ex_docmd.c | |
parent | 5dd143e22333a1c320fcf330f6c5061269bd1a17 (diff) |
patch 8.1.1851: crash when sound_playfile() callback plays soundv8.1.1851
Problem: Crash when sound_playfile() callback plays sound.
Solution: Invoke callback later from event loop.
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index ea58efa1d1..6369f10aa3 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -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 |