[vlc-devel] [PATCH v4 1/5] display: allow a NULL deactivate function
Steve Lhomme
robux4 at ycbcr.xyz
Wed Jul 10 10:39:04 CEST 2019
As used in vdummy.c since 0f600e2e215fc29970e60960d584b034bc6fa8e4
---
src/video_output/display.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 2173bb084e..4520780493 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -89,9 +89,12 @@ static int vout_display_start(void *func, bool forced, va_list ap)
static void vout_display_stop(void *func, va_list ap)
{
- vout_display_close_cb deactivate = func;
+ if (func)
+ {
+ vout_display_close_cb deactivate = func;
- deactivate(va_arg(ap, vout_display_t *));
+ deactivate(va_arg(ap, vout_display_t *));
+ }
}
/* */
--
2.17.1
More information about the vlc-devel
mailing list