decoder: added assertions on dc.pipe

dc.pipe must be non-NULL while the decoder thread is running.  Ensure
that with a load of assertions.
This commit is contained in:
Max Kellermann
2009-04-25 15:07:22 +02:00
parent d01d1ccad2
commit ceb00f787e
2 changed files with 13 additions and 0 deletions

View File

@@ -60,6 +60,7 @@ static void dc_command_async(enum decoder_command cmd)
void
dc_start(struct notify *notify, struct song *song)
{
assert(dc.pipe != NULL);
assert(song != NULL);
dc.next_song = song;
@@ -69,6 +70,7 @@ dc_start(struct notify *notify, struct song *song)
void
dc_start_async(struct song *song)
{
assert(dc.pipe != NULL);
assert(song != NULL);
dc.next_song = song;