[vlc-commits] skins2: remove useless hold/release

Rémi Denis-Courmont git at videolan.org
Fri Mar 15 02:28:13 CET 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Mar 14 12:08:07 2019 +0200| [6a8803cc757ce3a4ff5390925a4415d16a641ae9] | committer: Rémi Denis-Courmont

skins2: remove useless hold/release

The object (in practice, the vout window) cannot vanish here, since the
command is executed synchronously. We can just inherit the reference
from the caller.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6a8803cc757ce3a4ff5390925a4415d16a641ae9
---

 modules/gui/skins2/commands/cmd_callbacks.hpp | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/modules/gui/skins2/commands/cmd_callbacks.hpp b/modules/gui/skins2/commands/cmd_callbacks.hpp
index 6beed4131a..fdf8a5af57 100644
--- a/modules/gui/skins2/commands/cmd_callbacks.hpp
+++ b/modules/gui/skins2/commands/cmd_callbacks.hpp
@@ -75,14 +75,10 @@ public:
     {
         vlc_mutex_init( &m_lock );
         vlc_cond_init( &m_wait );
-        if( m_pObj )
-            vlc_object_hold( m_pObj );
     }
 
     virtual ~CmdExecuteBlock()
     {
-        if( m_pObj )
-            vlc_object_release( m_pObj );
         vlc_cond_destroy( &m_wait );
         vlc_mutex_destroy( &m_lock );
     }



More information about the vlc-commits mailing list