aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/output/openal_plugin.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/output/openal_plugin.c b/src/output/openal_plugin.c
index 2d581ebbf..e60e378d1 100644
--- a/src/output/openal_plugin.c
+++ b/src/output/openal_plugin.c
@@ -123,13 +123,13 @@ openal_init(G_GNUC_UNUSED const struct audio_format *audio_format,
const char *device_name = config_get_block_string(param, "device", NULL);
struct openal_data *od;
- od = g_new(struct openal_data, 1);
- od->device_name = device_name;
-
if (device_name == NULL) {
device_name = alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
}
+ od = g_new(struct openal_data, 1);
+ od->device_name = device_name;
+
return od;
}