diff --git a/modules/gui/qt/menus/menus.cpp b/modules/gui/qt/menus/menus.cpp index 997298fe5a92d5a1b2d1d21c9d519eadf33f79bf..c5d4c82db795b514c9033bf48aefe47cb81ac6a6 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 );