From 1324eaece08d84fbe3eb539642dba99b74dd1c07 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 25 Apr 2012 02:20:37 +0200 Subject: [PATCH] ao_openal: fix crash when no device parameter is passed --- libao2/ao_openal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libao2/ao_openal.c b/libao2/ao_openal.c index 263aed34fb..0e04f2cc81 100644 --- a/libao2/ao_openal.c +++ b/libao2/ao_openal.c @@ -133,7 +133,7 @@ static int init(int rate, int channels, int format, int flags) { print_help(); return 0; } - if (strcmp(device, "help") == 0) { + if (device && strcmp(device, "help") == 0) { list_devices(); goto err_out; }