diff options
author | Anton Khirnov <anton@khirnov.net> | 2010-11-27 20:36:11 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2010-12-07 17:32:52 +0100 |
commit | cb9965bab521cf9bbd2655162500e06ee6f60008 (patch) | |
tree | 21269f1c5c10a3dfdc6786191f38092feaf0dbe0 /src/command.c | |
parent | 429ed24c9903008c3699da48d353f48e1a3151f6 (diff) | |
download | mpd-cb9965bab521cf9bbd2655162500e06ee6f60008.tar.gz mpd-cb9965bab521cf9bbd2655162500e06ee6f60008.tar.xz mpd-cb9965bab521cf9bbd2655162500e06ee6f60008.zip |
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.
Diffstat (limited to 'src/command.c')
-rw-r--r-- | src/command.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/command.c b/src/command.c index df0146c16..781547b44 100644 --- a/src/command.c +++ b/src/command.c @@ -1715,15 +1715,11 @@ handle_sticker_song(struct client *client, int argc, char *argv[]) } sticker = sticker_song_get(song); - if (NULL == sticker) { - command_error(client, ACK_ERROR_NO_EXIST, - "no stickers found"); - return COMMAND_RETURN_ERROR; + if (sticker) { + sticker_print(client, sticker); + sticker_free(sticker); } - sticker_print(client, sticker); - sticker_free(sticker); - return COMMAND_RETURN_OK; /* set song song_id id key */ } else if (argc == 6 && strcmp(argv[1], "set") == 0) { |