[vlc-devel] [PATCH] Fixes crash after customizing the interface via popup menu.
VlcVelope
1034-135 at online.de
Sun Apr 29 22:54:41 CEST 2012
VLC crashed due to deleting the static QMenu in menus.cpp after getting invoked
from MainInterface::recreateToolBars(). At this point the main toolbars were
also shown, which caused wrong behaviour if invoked from minimal view.
Regards,
VlcVelope
---
modules/gui/qt4/main_interface.cpp | 1 +
modules/gui/qt4/menus.cpp | 4 +++-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 9c277fb..c99fa12 100755
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -352,6 +352,7 @@ void MainInterface::recreateToolbars()
this, handleKeyPress( QKeyEvent * ) );
THEMIM->requestVoutUpdate();
}
+ setMinimalView( b_minimalView );
}
void MainInterface::reloadPrefs()
diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
index 8959a6a..74582ec 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -764,7 +764,9 @@ QMenu *VLCMenuBar::HelpMenu( QWidget *parent )
*****************************************************************************/
#define POPUP_BOILERPLATE \
static QMenu* menu = NULL; \
- delete menu; menu = NULL; \
+ if( menu ) \
+ emit menu->deleteLater(); \
+ menu = NULL; \
if( !show ) \
return; \
QVector<vlc_object_t *> objects; \
--
1.7.5.4
More information about the vlc-devel
mailing list