wmix: do not risk a crash (null-pointer-dereference) if $DISPLAY is not set
commit2d191d0e6c2ae4934aa40da61790b48d1209e6ec
authorChristophe CURIS <christophe.curis@free.fr>
Sat, 7 Jun 2014 19:21:42 +0000 (7 21:21 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Sat, 7 Jun 2014 20:27:27 +0000 (7 21:27 +0100)
tree56a7ab49d49ca2c877a581e1ee3c8d1a57acf08e
parent4be6166084a8816ce1f92346b1ee141f881fb6df
wmix: do not risk a crash (null-pointer-dereference) if $DISPLAY is not set

The original code merely assumed that an XOpenDisplay failure was caused
only by incapacity to connect to the X server, but if $DISPLAY was not set
then the fprintf would be given a NULL pointer which it may not appreciate
(depending on the libc in use).
Let's avoid that case and try to provide more info to help the user.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
wmix/wmix.c