Skip to content

Commit 4c8af76

Browse files
committed
Merge branch 'fix-sticker-delete-crash' of github.com:M0Rf30/MPD into v0.24.x
2 parents 099971b + 9dba6d8 commit 4c8af76

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
ver 0.24.15 (not yet released)
2+
* protocol
3+
- fix crash on "sticker delete"
24
* playlist
35
- asx, rss, xspf: limit to 16 MB
46
- cue: fix problem playing CUE tracks in music directory root

src/command/StickerCommands.cxx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,12 @@ class DomainHandler {
8484
? sticker_database.Delete(sticker_type, uri)
8585
: sticker_database.DeleteValue(sticker_type, uri, name);
8686
if (!ret) {
87-
response.FmtError(ACK_ERROR_NO_EXIST, "no such sticker: {:?}", name);
87+
if (name == nullptr)
88+
response.FmtError(ACK_ERROR_NO_EXIST,
89+
"no stickers found: {:?}", uri);
90+
else
91+
response.FmtError(ACK_ERROR_NO_EXIST,
92+
"no such sticker: {:?}", name);
8893
return CommandResult::ERROR;
8994
}
9095

0 commit comments

Comments
 (0)