Commit 1e6611ff authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Avoid segfault on exist if the playlist was never called, during the...

Qt4 - Avoid segfault on exist if the playlist was never called, during the saving before exit. Bug re-introduced in 23333.
parent f673748b
......@@ -287,6 +287,16 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
MainInterface::~MainInterface()
{
if( playlistWidget ) playlistWidget->saveSettings( settings );
settings->beginGroup( "MainWindow" );
settings->setValue( "playlist-floats", dockPL->isFloating() );
settings->setValue( "adv-controls", getControlsVisibilityStatus() & CONTROLS_ADVANCED );
settings->setValue( "pos", pos() );
settings->endGroup();
delete settings;
/* Unregister callback for the intf-popupmenu variable */
playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_intf,
VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
......@@ -296,13 +306,7 @@ MainInterface::~MainInterface()
var_DelCallback( p_playlist, "intf-show", IntfShowCB, p_intf );
vlc_object_release( p_playlist );
}
settings->beginGroup( "MainWindow" );
settings->setValue( "playlist-floats", dockPL->isFloating() );
settings->setValue( "adv-controls", getControlsVisibilityStatus() & CONTROLS_ADVANCED );
settings->setValue( "pos", pos() );
playlistWidget->saveSettings( settings );
settings->endGroup();
delete settings;
p_intf->b_interaction = VLC_FALSE;
var_DelCallback( p_intf, "interaction", InteractCallback, this );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment