From 887f3e70707509145fa7e2c81a88ecce74c95f54 Mon Sep 17 00:00:00 2001 From: Erwan Tulou Date: Fri, 18 Jul 2014 12:38:36 +0200 Subject: [PATCH] Qt: remove a suspicious delete 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 | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp index 466e08907f..663c7eeb87 100644 --- a/modules/gui/qt4/main_interface.cpp +++ b/modules/gui/qt4/main_interface.cpp @@ -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 ); -- 2.11.4.GIT