summaryrefslogtreecommitdiff
path: root/src/libpiano
diff options
context:
space:
mode:
Diffstat (limited to 'src/libpiano')
-rw-r--r--src/libpiano/piano.h2
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, \