[vlc-commits] stream_filter: ifo: check return value

Francois Cartegnie git at videolan.org
Tue Feb 27 15:10:48 CET 2018


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Feb 27 14:18:00 2018 +0100| [98b87731f1583d006d6e85eb503f1316d8525058] | committer: Francois Cartegnie

stream_filter: ifo: check return value

(cherry picked from commit 7ce21a7c50a3420a0c5e9cb483b191ef146ac9a7)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=98b87731f1583d006d6e85eb503f1316d8525058
---

 modules/demux/playlist/ifo.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/modules/demux/playlist/ifo.c b/modules/demux/playlist/ifo.c
index c3269ccf50..4121fe19e5 100644
--- a/modules/demux/playlist/ifo.c
+++ b/modules/demux/playlist/ifo.c
@@ -105,8 +105,11 @@ static int ReadDVD( stream_t *p_stream, input_item_node_t *node )
         return VLC_EGENERIC;
 
     input_item_t *p_input = input_item_New( psz_url, psz_url );
-    input_item_node_AppendItem( node, p_input );
-    input_item_Release( p_input );
+    if( p_input )
+    {
+        input_item_node_AppendItem( node, p_input );
+        input_item_Release( p_input );
+    }
 
     free( psz_url );
 
@@ -126,8 +129,11 @@ static int ReadDVD_VR( stream_t *p_stream, input_item_node_t *node )
     strcpy( &psz_url[len - 12], "VR_MOVIE.VRO" );
 
     input_item_t *p_input = input_item_New( psz_url, psz_url );
-    input_item_node_AppendItem( node, p_input );
-    input_item_Release( p_input );
+    if( p_input )
+    {
+        input_item_node_AppendItem( node, p_input );
+        input_item_Release( p_input );
+    }
 
     free( psz_url );
 



More information about the vlc-commits mailing list