summaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-08-15 23:05:49 +0200
committerBram Moolenaar <Bram@vim.org>2019-08-15 23:05:49 +0200
commit28e67e0c1496b7bb166a0acfb176690f219101ca (patch)
treeb30fcbc9fd72f4aed6135478113fcd6dadf37912 /src/os_unix.c
parent5dd143e22333a1c320fcf330f6c5061269bd1a17 (diff)
downloadvim-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/os_unix.c')
-rw-r--r--src/os_unix.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 6387a7757..d80fb1db0 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -5998,6 +5998,11 @@ WaitForCharOrMouse(long msec, int *interrupted, int ignore_input)
rest -= msec;
}
# endif
+# ifdef FEAT_SOUND_CANBERRA
+ // Invoke any pending sound callbacks.
+ if (has_sound_callback_in_queue())
+ invoke_sound_callback();
+# endif
# ifdef FEAT_MOUSE_GPM
gpm_process_wanted = 0;
avail = RealWaitForChar(read_cmd_fd, msec,