From 71a4d6db6f88cbb735cd959b3dd16d83a27474cf Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 29 Dec 2018 02:16:16 -0800 Subject: Return a unique_ptr for the backend --- Alc/alc.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Alc/alc.cpp') diff --git a/Alc/alc.cpp b/Alc/alc.cpp index c625fd20..517e98d3 100644 --- a/Alc/alc.cpp +++ b/Alc/alc.cpp @@ -2203,7 +2203,6 @@ ALCdevice_struct::~ALCdevice_struct() { TRACE("%p\n", this); - delete Backend; Backend = nullptr; size_t count{std::accumulate(BufferList.cbegin(), BufferList.cend(), size_t{0u}, @@ -4037,7 +4036,7 @@ ALC_API void ALC_APIENTRY alcCaptureSamples(ALCdevice *device, ALCvoid *buffer, ALCenum err{ALC_INVALID_VALUE}; { std::lock_guard _{dev->BackendLock}; - BackendBase *backend{dev->Backend}; + BackendBase *backend{dev->Backend.get()}; if(samples >= 0 && backend->availableSamples() >= (ALCuint)samples) err = backend->captureSamples(buffer, samples); } -- cgit v1.2.3