aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/sdl2.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-18 18:45:45 -0800
committerChris Robinson <[email protected]>2018-11-18 18:45:45 -0800
commitbafcba7194c36eaf4fa1cb09b000170f8a138055 (patch)
tree5d81112305a2f920017bcf95a4a8221734eb2122 /Alc/backends/sdl2.cpp
parentb10e7d08c34bc6d46aaf61ef2a0183e7841b75f3 (diff)
Use a std::string for the device name
Diffstat (limited to 'Alc/backends/sdl2.cpp')
-rw-r--r--Alc/backends/sdl2.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Alc/backends/sdl2.cpp b/Alc/backends/sdl2.cpp
index 2ef7d852..d643faa3 100644
--- a/Alc/backends/sdl2.cpp
+++ b/Alc/backends/sdl2.cpp
@@ -174,9 +174,7 @@ static ALCenum ALCsdl2Backend_open(ALCsdl2Backend *self, const ALCchar *name)
self->FmtType = device->FmtType;
self->UpdateSize = device->UpdateSize;
- al_free(device->DeviceName);
- device->DeviceName = alstrdup(name ? name : defaultDeviceName);
-
+ device->DeviceName = name ? name : defaultDeviceName;
return ALC_NO_ERROR;
}