[vlc-commits] resource: Don't call DestroySout with a NULL sout_instance_t

Hugo Beauzée-Luyssen git at videolan.org
Wed Jun 21 17:12:23 CEST 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Jun 21 14:06:51 2017 +0200| [41d3e5365d24dd1177ba22cd392ed41769710158] | committer: Hugo Beauzée-Luyssen

resource: Don't call DestroySout with a NULL sout_instance_t

Doing so would be a no-op

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

 src/input/resource.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/input/resource.c b/src/input/resource.c
index 0021cec4c4..12dc847094 100644
--- a/src/input/resource.c
+++ b/src/input/resource.c
@@ -92,8 +92,10 @@ static sout_instance_t *RequestSout( input_resource_t *p_resource,
     if( !p_sout && !psz_sout )
     {
         if( p_resource->p_sout )
+        {
             msg_Dbg( p_resource->p_sout, "destroying useless sout" );
-        DestroySout( p_resource );
+            DestroySout( p_resource );
+        }
         return NULL;
     }
 



More information about the vlc-commits mailing list