stream: assert that the underlying access is valid
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 26 Jun 2014 15:34:34 +0000 (18:34 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 26 Jun 2014 15:34:34 +0000 (18:34 +0300)
src/input/stream.c

index 44138b1..734fcf0 100644 (file)
@@ -298,6 +298,7 @@ stream_t *stream_AccessNew( access_t *p_access, char **ppsz_list )
 
     /* Common field */
     p_sys->p_access = p_access;
+    assert( p_access->pf_block || p_access->pf_read || p_access->pf_readdir );
     if( p_access->pf_block )
         p_sys->method = STREAM_METHOD_BLOCK;
     else if( p_access->pf_read )