Commit 3b0885e5 authored by Clément Stenac's avatar Clément Stenac

Sanity checks

parent 7c4a54f9
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
*****************************************************************************/ *****************************************************************************/
#include <vlc/vlc.h> #include <vlc/vlc.h>
#include <vlc/input.h> #include <vlc/input.h>
#include <assert.h>
#include "vlc_playlist.h" #include "vlc_playlist.h"
void AddItem( playlist_t *p_playlist, playlist_item_t *p_item, void AddItem( playlist_t *p_playlist, playlist_item_t *p_item,
...@@ -267,6 +267,7 @@ int playlist_BothAddInput( playlist_t *p_playlist, ...@@ -267,6 +267,7 @@ int playlist_BothAddInput( playlist_t *p_playlist,
{ {
playlist_item_t *p_item, *p_up; playlist_item_t *p_item, *p_up;
int i_top; int i_top;
assert( p_input );
vlc_mutex_lock( & p_playlist->object_lock ); vlc_mutex_lock( & p_playlist->object_lock );
/* Add to category */ /* Add to category */
...@@ -338,12 +339,8 @@ playlist_item_t * playlist_NodeAddInput( playlist_t *p_playlist, ...@@ -338,12 +339,8 @@ playlist_item_t * playlist_NodeAddInput( playlist_t *p_playlist,
int i_mode, int i_pos ) int i_mode, int i_pos )
{ {
playlist_item_t *p_item; playlist_item_t *p_item;
assert( p_input );
/* Sanity checks */ assert( p_parent && p_parent->i_children != -1 );
if( !p_parent || p_parent->i_children == -1 )
{
msg_Err( p_playlist, "invalid node" );
}
vlc_mutex_lock( &p_playlist->object_lock ); vlc_mutex_lock( &p_playlist->object_lock );
......
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