[vlc-devel] commit: QueueMsg: assert p_this ( Rémi Denis-Courmont )

git version control git at videolan.org
Fri May 9 17:04:05 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Fri May  9 18:05:24 2008 +0300| [f9b6eba7207f9ab55218e406b10929145dcae8e3]

QueueMsg: assert p_this

(If you don't want to give an object, then use fprintf() really...)

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

 src/misc/messages.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/src/misc/messages.c b/src/misc/messages.c
index fde2d12..e2345ff 100644
--- a/src/misc/messages.c
+++ b/src/misc/messages.c
@@ -268,6 +268,7 @@ static void QueueMsg( vlc_object_t *p_this, int i_queue, int i_type,
                       const char *psz_module,
                       const char *psz_format, va_list _args )
 {
+    assert (p_this);
     libvlc_priv_t *priv = libvlc_priv (p_this->p_libvlc);
     int         i_header_size;             /* Size of the additionnal header */
     vlc_object_t *p_obj;
@@ -282,17 +283,6 @@ static void QueueMsg( vlc_object_t *p_this, int i_queue, int i_type,
     int          i_size = strlen(psz_format) + INTF_MAX_MSG_SIZE;
 #endif
 
-    if( p_this == NULL )
-    {
-#ifndef NDEBUG
-        if( i_type == VLC_MSG_DBG )
-            return;
-#endif
-        utf8_vfprintf( stderr, psz_format, _args );
-        fputc ('\n', stderr);
-        return;
-    }
-
     if( p_this->i_flags & OBJECT_FLAGS_QUIET ||
         (p_this->i_flags & OBJECT_FLAGS_NODBG && i_type == VLC_MSG_DBG) )
         return;




More information about the vlc-devel mailing list