summaryrefslogtreecommitdiffstats
path: root/libao2
diff options
context:
space:
mode:
authorwm4 <wm4@mplayer2.org>2012-04-25 02:20:37 +0200
committerwm4 <wm4@mplayer2.org>2012-04-25 02:20:37 +0200
commit1324eaece08d84fbe3eb539642dba99b74dd1c07 (patch)
tree5e93d7e09b219a13af6465845bd9b7cdf2e6506b /libao2
parent6bee9a8158eae01baa8f6db3e328e06bb2124e0b (diff)
downloadmpv-1324eaece08d84fbe3eb539642dba99b74dd1c07.tar.bz2
mpv-1324eaece08d84fbe3eb539642dba99b74dd1c07.tar.xz
ao_openal: fix crash when no device parameter is passed
Diffstat (limited to 'libao2')
-rw-r--r--libao2/ao_openal.c2
1 files changed, 1 insertions, 1 deletions
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;
}