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

Steve Lhomme robux4 at ycbcr.xyz
Mon Aug 24 09:41:44 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 8989206ece1..418e8c09032 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1878,11 +1878,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