From 69dde0aa4891762994ae846a74e32089b5d202c6 Mon Sep 17 00:00:00 2001
From: Geoffroy Couprie <geo.couprie@gmail.com>
Date: Thu, 14 Aug 2008 16:17:55 +0200
Subject: [PATCH] Re-fix #1598. p_helper->p_parent == NULL, so it never releases p_helper, and crashes at the leaking objects check

---
 src/misc/win32_specific.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/misc/win32_specific.c b/src/misc/win32_specific.c
index 9e27ca9..ef2ea21 100644
--- a/src/misc/win32_specific.c
+++ b/src/misc/win32_specific.c
@@ -372,13 +372,13 @@ void system_End( libvlc_int_t *p_this )
         free( vlc_global()->psz_vlcpath );
         vlc_global()->psz_vlcpath = NULL;
     }
-    if (p_helper && p_helper->p_parent == VLC_OBJECT(p_this) )
+    if (p_helper)
     {
+        SendMessage( NULL, WM_QUIT, 0, 0 );
         /* FIXME: thread-safety + join the thread(?)... */
         vlc_object_release (p_helper);
         p_helper = NULL;
     }
-
 #if !defined( UNDER_CE )
     timeEndPeriod(5);
 #endif
-- 
1.5.6.4

