Commit cb9965ba authored by Anton Khirnov's avatar Anton Khirnov Committed by Max Kellermann

command: don't error when sticker list is run on song with no stickers

this is inconsistent with other commands (e.g. find) and seems wrong -- a song with no stickers attached is a perfectly valid state and an empty list of stickers is also perfectly valid.
parent 429ed24c
...@@ -1715,14 +1715,10 @@ handle_sticker_song(struct client *client, int argc, char *argv[]) ...@@ -1715,14 +1715,10 @@ handle_sticker_song(struct client *client, int argc, char *argv[])
} }
sticker = sticker_song_get(song); sticker = sticker_song_get(song);
if (NULL == sticker) { if (sticker) {
command_error(client, ACK_ERROR_NO_EXIST,
"no stickers found");
return COMMAND_RETURN_ERROR;
}
sticker_print(client, sticker); sticker_print(client, sticker);
sticker_free(sticker); sticker_free(sticker);
}
return COMMAND_RETURN_OK; return COMMAND_RETURN_OK;
/* set song song_id id key */ /* set song song_id id key */
......
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