[vlc-devel] [PATCH v4 03/23] video_output: only reset the mouse_event if it was set on display release

Steve Lhomme robux4 at ycbcr.xyz
Fri Aug 21 11:59:21 CEST 2020


We already have the "if" so make use of it.
---
 src/video_output/video_output.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index a2c33fb610f..c6a034be46f 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1887,11 +1887,13 @@ static void vout_ReleaseDisplay(vout_thread_sys_t *vout)
     }
 
     if (sys->mouse_event)
+    {
         sys->mouse_event(NULL, sys->mouse_opaque);
+        sys->mouse_event = NULL;
+    }
 
     if (sys->spu)
         spu_Detach(sys->spu);
-    sys->mouse_event = NULL;
     sys->clock = NULL;
     video_format_Clean(&sys->original);
 }
-- 
2.26.2



More information about the vlc-devel mailing list