[vlc-commits] qt: menus: fix crash with skins2
Alexandre Janniaux
git at videolan.org
Sun Jan 3 15:14:46 UTC 2021
vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Wed Dec 23 11:36:59 2020 +0100| [96c28794201cf4d7eb7febbcd16de9018922674e] | committer: Alexandre Janniaux
qt: menus: fix crash with skins2
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=96c28794201cf4d7eb7febbcd16de9018922674e
---
modules/gui/qt/menus/menus.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt/menus/menus.cpp b/modules/gui/qt/menus/menus.cpp
index 997298fe5a..c5d4c82db7 100644
--- a/modules/gui/qt/menus/menus.cpp
+++ b/modules/gui/qt/menus/menus.cpp
@@ -221,7 +221,7 @@ QMenu *VLCMenuBar::FileMenu( intf_thread_t *p_intf, QMenu *menu, MainInterface *
addDPStaticEntry( menu, qtr( "Open &Location from clipboard" ),
NULL, &DialogsProvider::openUrlDialog, "Ctrl+V" );
- if( var_InheritBool( p_intf, "qt-recentplay" ) && mi->hasMediaLibrary() )
+ if( mi && var_InheritBool( p_intf, "qt-recentplay" ) && mi->hasMediaLibrary() )
{
MLRecentsModel* recentModel = new MLRecentsModel(nullptr);
recentModel->setMl(mi->getMediaLibrary());
@@ -530,7 +530,7 @@ QMenu *VLCMenuBar::NavigMenu( intf_thread_t *p_intf, QMenu *menu )
menu->addMenu( submenu );
menu->addMenu( new CheckableListMenu( qtr("&Program") , THEMIM->getPrograms(), CheckableListMenu::GROUPED , menu) );
- if (p_intf->p_sys->p_mi->hasMediaLibrary() )
+ if (p_intf->p_sys->p_mi && p_intf->p_sys->p_mi->hasMediaLibrary() )
{
submenu = new QMenu( qtr( I_MENU_BOOKMARK ), menu );
submenu->setTearOffEnabled( true );
More information about the vlc-commits
mailing list