[libdvbpsi-devel] examples/decode_mpeg.c: (CID 17249)

Jean-Paul Saman git at videolan.org
Wed Apr 16 15:53:33 CEST 2014


libdvbpsi | branch: master | Jean-Paul Saman <jpsaman at videolan.org> | Fri Apr 11 16:43:48 2014 +0200| [99169e7a74de698187ce166f562b5b50adc6effc] | committer: Jean-Paul Saman

examples/decode_mpeg.c: (CID 17249)

Check for p_stream to be a valid pointer.

> http://git.videolan.org/gitweb.cgi/libdvbpsi.git/?a=commit;h=99169e7a74de698187ce166f562b5b50adc6effc
---

 examples/decode_mpeg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/decode_mpeg.c b/examples/decode_mpeg.c
index 1d9f4cb..01556a8 100644
--- a/examples/decode_mpeg.c
+++ b/examples/decode_mpeg.c
@@ -856,7 +856,7 @@ out_of_memory:
     fprintf( stderr, "Out of memory\n" );
 
 dvbpsi_out:
-    if( p_stream->pat.handle )
+    if( p_stream && p_stream->pat.handle )
     {
         dvbpsi_pat_detach( p_stream->pat.handle );
         dvbpsi_delete( p_stream->pat.handle );



More information about the libdvbpsi-devel mailing list