[vlc-devel] [PATCH 2/5] vout: win32: drawable: fix leaking known hwnd table

Steve Lhomme robux4 at ycbcr.xyz
Thu May 7 14:39:09 CEST 2020


When the last hwnd is removed there is only element which holds NULL.
---
 modules/video_output/drawable.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/video_output/drawable.c b/modules/video_output/drawable.c
index 63dc6c8e87d3..f9db604d5603 100644
--- a/modules/video_output/drawable.c
+++ b/modules/video_output/drawable.c
@@ -80,7 +80,7 @@ static void RemoveDrawable(uintptr_t val)
         used[n] = used[n + 1];
     while (used[++n] != 0);
 
-    if (n == 0)
+    if (n == 1)
     {
         free (used);
         used = NULL;
-- 
2.17.1



More information about the vlc-devel mailing list