$OpenBSD: patch-src_libpiano_piano_h,v 1.12 2015/03/20 14:59:36 dcoppa Exp $

commit 1cd5c5ec77ea43088982a439b58499be87c62087
Author: Lars-Dominik Braun <lars@6xq.net>
Date:   Sat Mar 7 16:01:26 2015 +0100

Fix upcoming songs assertion failure
This should not be an assertion, it is expected to happen.

--- src/libpiano/piano.h.orig	Sun Sep 28 08:17:29 2014
+++ src/libpiano/piano.h	Fri Mar 20 09:44:47 2015
@@ -317,7 +317,7 @@ void *PianoListDelete (PianoListHead_t * const l, Pian
 		__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, \
