Commit 943bf4b4 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* Don't crash if we want to msg_Dbg on an object that doesn't exist.

parent 4613b810
...@@ -298,7 +298,7 @@ static void QueueMsg( vlc_object_t *p_this, int i_queue_id, int i_type, ...@@ -298,7 +298,7 @@ static void QueueMsg( vlc_object_t *p_this, int i_queue_id, int i_type,
{ {
int i_header_size; /* Size of the additionnal header */ int i_header_size; /* Size of the additionnal header */
vlc_object_t *p_obj; vlc_object_t *p_obj;
msg_bank_t * p_bank = &p_this->p_libvlc->msg_bank; /* message bank */ msg_bank_t *p_bank; /* message bank */
msg_queue_t *p_queue = NULL; msg_queue_t *p_queue = NULL;
char * psz_str = NULL; /* formatted message string */ char * psz_str = NULL; /* formatted message string */
char * psz_header = NULL; char * psz_header = NULL;
...@@ -311,13 +311,15 @@ static void QueueMsg( vlc_object_t *p_this, int i_queue_id, int i_type, ...@@ -311,13 +311,15 @@ static void QueueMsg( vlc_object_t *p_this, int i_queue_id, int i_type,
#endif #endif
int i; int i;
if( p_this->i_flags & OBJECT_FLAGS_QUIET || if( p_this == NULL || p_this->i_flags & OBJECT_FLAGS_QUIET ||
(p_this->i_flags & OBJECT_FLAGS_NODBG && (p_this->i_flags & OBJECT_FLAGS_NODBG &&
i_type == VLC_MSG_DBG ) ) i_type == VLC_MSG_DBG ) )
{ {
return; return;
} }
p_bank = &p_this->p_libvlc->msg_bank;
/* /*
* Convert message to string * Convert message to string
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment