aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/sdl2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends/sdl2.cpp')
-rw-r--r--Alc/backends/sdl2.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Alc/backends/sdl2.cpp b/Alc/backends/sdl2.cpp
index 82c350e1..c918b57c 100644
--- a/Alc/backends/sdl2.cpp
+++ b/Alc/backends/sdl2.cpp
@@ -174,7 +174,8 @@ static ALCenum ALCsdl2Backend_open(ALCsdl2Backend *self, const ALCchar *name)
self->FmtType = device->FmtType;
self->UpdateSize = device->UpdateSize;
- alstr_copy_cstr(&device->DeviceName, name ? name : defaultDeviceName);
+ al_free(device->DeviceName);
+ device->DeviceName = alstrdup(name ? name : defaultDeviceName);
return ALC_NO_ERROR;
}