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.
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index ea58efa..6369f10 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -7692,8 +7692,12 @@
}
#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