]> git.sesse.net Git - vlc/commitdiff
Qt: remove a suspicious delete
authorErwan Tulou <erwan10@videolan.org>
Fri, 18 Jul 2014 10:38:36 +0000 (12:38 +0200)
committerErwan Tulou <erwan10@videolan.org>
Fri, 18 Jul 2014 10:58:52 +0000 (12:58 +0200)
in Qt doc about QMainWindow, about statusBar() and setStatusBar(), it reads :
"Note that QMainWindow takes ownership of the statusbar pointer
and deletes it at the appropriate time."
So, trying to delete the pointer returned by statusBar() can but
end up in a double free at some point.

modules/gui/qt4/main_interface.cpp

index 466e08907f73d12131cb8288c26f51a20092e029..663c7eeb876e7296c046a820d0d5a0615857f37a 100644 (file)
@@ -304,8 +304,6 @@ MainInterface::~MainInterface()
     /* Save this size */
     QVLCTools::saveWidgetPosition(settings, this);
 
-    delete statusBar();
-
     /* Unregister callbacks */
     var_DelCallback( p_intf->p_libvlc, "intf-boss", IntfBossCB, p_intf );
     var_DelCallback( p_intf->p_libvlc, "intf-show", IntfRaiseMainCB, p_intf );