Commit c2bbf876 authored by Max Kellermann's avatar Max Kellermann

player: added some more assertions

Assertions on pc.command and pc.next_song.
parent 799d1c9d
......@@ -57,6 +57,8 @@ pc_song_deleted(const struct song *song)
static void player_command(enum player_command cmd)
{
assert(pc.command == PLAYER_COMMAND_NONE);
pc.command = cmd;
while (pc.command != PLAYER_COMMAND_NONE) {
notify_signal(&pc.notify);
......
......@@ -526,6 +526,8 @@ static gpointer player_task(G_GNUC_UNUSED gpointer arg)
switch (pc.command) {
case PLAYER_COMMAND_PLAY:
case PLAYER_COMMAND_QUEUE:
assert(pc.next_song != NULL);
do_play();
break;
......
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