diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2015-03-07 16:01:26 +0100 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2015-03-07 16:01:26 +0100 |
commit | 1cd5c5ec77ea43088982a439b58499be87c62087 (patch) | |
tree | 914b1e957ca685f956ee3956ea90c24ec94f5da7 /src/libpiano | |
parent | d888d0ac2aeb233deeb70aaca196453f8195e433 (diff) | |
download | pianobar-windows-1cd5c5ec77ea43088982a439b58499be87c62087.tar.gz pianobar-windows-1cd5c5ec77ea43088982a439b58499be87c62087.tar.bz2 pianobar-windows-1cd5c5ec77ea43088982a439b58499be87c62087.zip |
Fix upcoming songs assertion failure
This should not be an assertion, it is expected to happen. Test with
`echo -e "s0\nu" > ctl`. Fixes #509.
Diffstat (limited to 'src/libpiano')
-rw-r--r-- | src/libpiano/piano.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libpiano/piano.h b/src/libpiano/piano.h index 58eb7ef..28a2b45 100644 --- a/src/libpiano/piano.h +++ b/src/libpiano/piano.h @@ -317,7 +317,7 @@ void *PianoListDelete (PianoListHead_t * const l, PianoListHead_t * const e) __attribute__ ((warn_unused_result)); #define PianoListDeleteP(l,e) PianoListDelete(((l) == NULL) ? NULL : &(l)->head, \ &(e)->head) -#define PianoListNextP(e) ((void *) (e)->head.next) +#define PianoListNextP(e) ((e) == NULL ? NULL : (void *) (e)->head.next) void *PianoListPrepend (PianoListHead_t * const l, PianoListHead_t * const e) __attribute__ ((warn_unused_result)); #define PianoListPrependP(l,e) PianoListPrepend (((l) == NULL) ? NULL : &(l)->head, \ |