ap

An audio player suited to my tastes
Log | Files | Refs | README | LICENSE

commit a20eca4f63338d9cfa43877513726c3aecf1396f
parent 4230e9dc0af33a6eeea17da2a490fb495fbc0142
Author: Jacob R. Edwards <n/a>
Date:   Mon, 26 Dec 2022 17:19:07 -0800

Fix play on empty queue bug

When the play command was issued with an empty queue, no error was
returned. Furthermore, NULL got dereferenced. This is now fixed.

Diffstat:
Maps/command.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/aps/command.c b/aps/command.c @@ -123,6 +123,8 @@ com_play(struct aps *aps, int fd, int argc, char **argv) { char *err; + if (!aps->queue) + return "Empty queue"; if (argc && (err = com_seek(aps, fd, argc, argv))) return err; if (pplay(aps->player, aps->queue->path))