[vlc-commits] qt: fix crashes trying to open "Audio" menu
Pierre Lamot
git at videolan.org
Mon Nov 6 16:06:51 CET 2017
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Mon Nov 6 12:14:00 2017 +0100| [042733829c14f8b2b1e734cc90856de92826a87b] | committer: Jean-Baptiste Kempf
qt: fix crashes trying to open "Audio" menu
Fixes #19022
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=042733829c14f8b2b1e734cc90856de92826a87b
---
modules/gui/qt/menus.cpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt/menus.cpp b/modules/gui/qt/menus.cpp
index 8bb9d56f47..a73d91157c 100644
--- a/modules/gui/qt/menus.cpp
+++ b/modules/gui/qt/menus.cpp
@@ -606,10 +606,12 @@ QMenu *VLCMenuBar::AudioMenu( intf_thread_t *p_intf, QMenu * current )
audio_output_t *p_aout;
input_thread_t *p_input;
+ if (!audioDeviceMenu)
+ audioDeviceMenu = new QMenu( qtr( "Audio &Device" ) );
+
if( current->isEmpty() )
{
addActionWithSubmenu( current, "audio-es", qtr( "Audio &Track" ) );
- audioDeviceMenu = new QMenu(qtr( "Audio &Device" ), current );
current->addMenu( audioDeviceMenu );
addActionWithSubmenu( current, "stereo-mode", qtr( "&Stereo Mode" ) );
current->addSeparator();
@@ -662,12 +664,14 @@ QMenu *VLCMenuBar::VideoMenu( intf_thread_t *p_intf, QMenu *current )
QVector<vlc_object_t *> objects;
QVector<const char *> varnames;
+ if ( !rendererMenu )
+ rendererMenu = RendererMenu( p_intf );
+
if( current->isEmpty() )
{
addActionWithSubmenu( current, "video-es", qtr( "Video &Track" ) );
current->addSeparator();
- rendererMenu = RendererMenu( p_intf, current );
current->addMenu( rendererMenu );
current->addSeparator();
More information about the vlc-commits
mailing list