]> git.sesse.net Git - vlc/commitdiff
* Fix the cddax probing crash
authorDerk-Jan Hartman <hartman@videolan.org>
Tue, 28 Sep 2004 15:48:43 +0000 (15:48 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Tue, 28 Sep 2004 15:48:43 +0000 (15:48 +0000)
modules/access/cdda/access.c

index bc5332a273713ef4a0467e00ccf16e53eb507935..1426103549da1451c194c26d4a21d3ee0d9d9d2b 100644 (file)
@@ -100,6 +100,10 @@ static void
 cdio_log_handler (cdio_log_level_t level, const char message[])
 {
   cdda_data_t *p_cdda = (cdda_data_t *)p_cdda_input->p_sys;
+
+  if( p_cdda == NULL )
+      return;
+
   switch (level) {
   case CDIO_LOG_DEBUG:
   case CDIO_LOG_INFO:
@@ -819,6 +823,8 @@ E_(CDDAOpen)( vlc_object_t *p_this )
     vlc_bool_t  b_single_track = false;
     int         i_rc = VLC_EGENERIC;
 
+    p_access->p_sys = NULL;
+
     /* Set where to log errors messages from libcdio. */
     p_cdda_input = p_access;