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/ui.c | |
parent | 5dd143e22333a1c320fcf330f6c5061269bd1a17 (diff) | |
download | vim-git-28e67e0c1496b7bb166a0acfb176690f219101ca.tar.gz |
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/ui.c')
-rw-r--r-- | src/ui.c | 20 |
1 files changed, 15 insertions, 5 deletions
@@ -459,12 +459,22 @@ ui_wait_for_chars_or_timer( } if (due_time <= 0 || (wtime > 0 && due_time > remaining)) due_time = remaining; -# ifdef FEAT_JOB_CHANNEL - if ((due_time < 0 || due_time > 10L) -# ifdef FEAT_GUI - && !gui.in_use +# if defined(FEAT_JOB_CHANNEL) || defined(FEAT_SOUND_CANBERRA) + if ((due_time < 0 || due_time > 10L) && ( +# if defined(FEAT_JOB_CHANNEL) + ( +# if defined(FEAT_GUI) + !gui.in_use && +# endif + (has_pending_job() || channel_any_readahead())) +# ifdef FEAT_SOUND_CANBERRA + || +# endif +# endif +# ifdef FEAT_SOUND_CANBERRA + has_any_sound_callback() # endif - && (has_pending_job() || channel_any_readahead())) + )) { // There is a pending job or channel, should return soon in order // to handle them ASAP. Do check for input briefly. |