]> git.sesse.net Git - vlc/commitdiff
Qt4: small memory leak
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 25 Jun 2008 19:10:27 +0000 (22:10 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 25 Jun 2008 19:10:27 +0000 (22:10 +0300)
modules/gui/qt4/qt4.cpp

index e663d754c87333cc29c5f74d7f7dbfeddb2558ba..4255a2b0cf6e2064ec54009b6e674a5322c18e32 100644 (file)
@@ -403,8 +403,14 @@ static void Init( intf_thread_t *p_intf )
 
     /* And quit */
 
+    windowLock.lock ();
+    var_Get (p_intf, "window_widget", &val);
+    if (val.p_address)
+        delete (QPointer<MainInterface> *)val.p_address;
     val.p_address = NULL;
     var_Set (p_intf, "window_widget", val);
+    windowLock.unlock();
+
     /* Destroy first the main interface because it is connected to some slots
        in the MainInputManager */
     delete p_intf->p_sys->p_mi;