[vlc-commits] check for NULL

Rafaël Carré git at videolan.org
Tue Jan 17 19:55:12 CET 2012


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Tue Jan 17 13:53:01 2012 -0500| [e64c71e8ea08ecbd678d4b652531a3ae151308f2] | committer: Rafaël Carré

check for NULL

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

 lib/video.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/video.c b/lib/video.c
index 7e092bd..0c7bb2d 100644
--- a/lib/video.c
+++ b/lib/video.c
@@ -163,6 +163,8 @@ int libvlc_video_get_size( libvlc_media_player_t *p_mi, unsigned num,
 {
     libvlc_media_track_info_t *info;
     int ret = -1;
+    if (!p_mi->p_md)
+        return ret;
     int infos = libvlc_media_get_tracks_info(p_mi->p_md, &info);
     if (infos <= 0)
         return ret;



More information about the vlc-commits mailing list