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

Steve Lhomme robux4 at ycbcr.xyz
Tue Aug 18 16:58:30 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 62d218f4c15..c95fd0dfa74 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1885,11 +1885,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