- if( p_log )
- {
- msg_cb_data_t *data = &((libvlc_log_t *)p_log)->data;
- unsigned ret;
-
- /* We cannot lock due to constant pointer constraints. Break them.
- * Even then, this si not really thread safe anyway. */
- vlc_spin_lock (&data->lock);
- ret = data->count;
- vlc_spin_unlock (&data->lock);
- return ret;
- }
- RAISEZERO("Invalid log object!");
+ if( !p_log )
+ return 0;
+
+ msg_cb_data_t *data = &((libvlc_log_t *)p_log)->data;
+ unsigned ret;
+
+ /* We cannot lock due to constant pointer constraints. Break them.
+ * Even then, this si not really thread safe anyway. */
+ vlc_spin_lock (&data->lock);
+ ret = data->count;
+ vlc_spin_unlock (&data->lock);
+ return ret;