[vlc-commits] Qt: remove a suspicious delete
Erwan Tulou
git at videolan.org
Fri Jul 18 13:01:50 CEST 2014
vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Fri Jul 18 12:38:36 2014 +0200| [887f3e70707509145fa7e2c81a88ecce74c95f54] | committer: Erwan Tulou
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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=887f3e70707509145fa7e2c81a88ecce74c95f54
---
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 466e089..663c7ee 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 );
More information about the vlc-commits
mailing list