aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/opensl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends/opensl.cpp')
-rw-r--r--Alc/backends/opensl.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Alc/backends/opensl.cpp b/Alc/backends/opensl.cpp
index 9d938ba4..689c02af 100644
--- a/Alc/backends/opensl.cpp
+++ b/Alc/backends/opensl.cpp
@@ -375,7 +375,8 @@ static ALCenum ALCopenslPlayback_open(ALCopenslPlayback *self, const ALCchar *na
return ALC_INVALID_VALUE;
}
- alstr_copy_cstr(&device->DeviceName, name);
+ al_free(device->DeviceName);
+ device->DeviceName = alstrdup(name);
return ALC_NO_ERROR;
}
@@ -900,7 +901,8 @@ static ALCenum ALCopenslCapture_open(ALCopenslCapture *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;
}