[vlc-commits] skins: remove vain object hold/release
Rémi Denis-Courmont
git at videolan.org
Sun Dec 2 19:00:28 CET 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Dec 1 18:05:33 2018 +0200| [bcbd0427ce55c259cde2f236c3984d06175dee6a] | committer: Rémi Denis-Courmont
skins: remove vain object hold/release
Holding the interface object does not prevent the interface from
getting destroyed. This solves nothing.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bcbd0427ce55c259cde2f236c3984d06175dee6a
---
modules/gui/skins2/src/skin_main.cpp | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/modules/gui/skins2/src/skin_main.cpp b/modules/gui/skins2/src/skin_main.cpp
index 2129ff045e..284a0c9fc3 100644
--- a/modules/gui/skins2/src/skin_main.cpp
+++ b/modules/gui/skins2/src/skin_main.cpp
@@ -379,26 +379,17 @@ static int WindowOpen( vout_window_t *pWnd, const vout_window_cfg_t *cfg )
vlc_mutex_lock( &skin_load.mutex );
intf_thread_t *pIntf = skin_load.intf;
- if( pIntf )
- vlc_object_hold( pIntf );
vlc_mutex_unlock( &skin_load.mutex );
if( pIntf == NULL )
return VLC_EGENERIC;
- if( !var_InheritBool( pIntf, "skinned-video") ||
- cfg->is_standalone )
- {
- vlc_object_release( pIntf );
+ if( !var_InheritBool( pIntf, "skinned-video") || cfg->is_standalone )
return VLC_EGENERIC;
- }
sys = new (std::nothrow) vout_window_sys_t;
if( !sys )
- {
- vlc_object_release( pIntf );
return VLC_ENOMEM;
- }
pWnd->sys = sys;
sys->cfg = *cfg;
@@ -416,7 +407,6 @@ static int WindowOpen( vout_window_t *pWnd, const vout_window_cfg_t *cfg )
{
msg_Dbg( pIntf, "Vout window creation failed" );
delete sys;
- vlc_object_release( pIntf );
return VLC_EGENERIC;
}
@@ -435,7 +425,6 @@ static void WindowClose( vout_window_t *pWnd )
WindowCloseLocal );
CmdExecuteBlock::executeWait( CmdGenericPtr( cmd ) );
- vlc_object_release( sys->pIntf );
delete sys;
}
More information about the vlc-commits
mailing list