From 798e68ef623192a97bde77c015b4056ad3a8765c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 8 Mar 2021 22:18:01 +0100 Subject: [PATCH] output/wasapi: don't clear the exception in CheckException() This is pointless; the method cannot be called again anyway. --- src/output/plugins/wasapi/WasapiOutputPlugin.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/output/plugins/wasapi/WasapiOutputPlugin.cxx b/src/output/plugins/wasapi/WasapiOutputPlugin.cxx index 37ec0cfd6..3314204fc 100644 --- a/src/output/plugins/wasapi/WasapiOutputPlugin.cxx +++ b/src/output/plugins/wasapi/WasapiOutputPlugin.cxx @@ -195,8 +195,7 @@ public: void WaitDataPoped() noexcept { data_poped.Wait(); } void CheckException() { if (error.occur.load()) { - auto err = std::exchange(error.ptr, nullptr); - std::rethrow_exception(err); + std::rethrow_exception(error.ptr); } }