diff options
Diffstat (limited to 'Alc/backends/portaudio.cpp')
-rw-r--r-- | Alc/backends/portaudio.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Alc/backends/portaudio.cpp b/Alc/backends/portaudio.cpp index 03194c05..7b21669a 100644 --- a/Alc/backends/portaudio.cpp +++ b/Alc/backends/portaudio.cpp @@ -249,7 +249,8 @@ retry_open: return ALC_INVALID_VALUE; } - alstr_copy_cstr(&device->DeviceName, name); + al_free(device->DeviceName); + device->DeviceName = alstrdup(name); return ALC_NO_ERROR; @@ -440,7 +441,8 @@ static ALCenum ALCportCapture_open(ALCportCapture *self, const ALCchar *name) return ALC_INVALID_VALUE; } - alstr_copy_cstr(&device->DeviceName, name); + al_free(device->DeviceName); + device->DeviceName = alstrdup(name); return ALC_NO_ERROR; } |