]> git.sesse.net Git - vlc/commitdiff
* Fixed a segfault (closes #132)
authorOlivier Teulière <ipkiss@videolan.org>
Mon, 27 Jan 2003 21:44:39 +0000 (21:44 +0000)
committerOlivier Teulière <ipkiss@videolan.org>
Mon, 27 Jan 2003 21:44:39 +0000 (21:44 +0000)
src/misc/netutils.c

index b1fdc7bb2622c7ad892d595d5bfdeda988e6e732..ba91474f7a2e838a9c9b126b09b7549f91498f72 100644 (file)
@@ -2,7 +2,7 @@
  * netutils.c: various network functions
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: netutils.c,v 1.78 2003/01/15 23:55:22 massiot Exp $
+ * $Id: netutils.c,v 1.79 2003/01/27 21:44:39 ipkiss Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Benoit Steiner <benny@via.ecp.fr>
@@ -174,6 +174,12 @@ int __network_ChannelJoin( vlc_object_t *p_this, int i_channel )
     struct timeval delay;
     fd_set fds;
 
+    if( p_this->p_vlc->p_channel == NULL )
+    {
+        msg_Warn( p_this, "channels not initialized" );
+        return 0;
+    }
+
     if( p_this->p_vlc->p_channel->i_channel == i_channel )
     {
         return 0;