瀏覽代碼

win-wasapi: Catch by reference

Michael Fabian 'Xaymar' Dirks 6 年之前
父節點
當前提交
00298fd4f1
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      plugins/win-wasapi/enum-wasapi.cpp
  2. 1 1
      plugins/win-wasapi/win-wasapi.cpp

+ 1 - 1
plugins/win-wasapi/enum-wasapi.cpp

@@ -91,7 +91,7 @@ void GetWASAPIAudioDevices(vector<AudioDeviceInfo> &devices, bool input)
 	try {
 		GetWASAPIAudioDevices_(devices, input);
 
-	} catch (HRError error) {
+	} catch (HRError &error) {
 		blog(LOG_WARNING, "[GetWASAPIAudioDevices] %s: %lX", error.str,
 		     error.hr);
 	}

+ 1 - 1
plugins/win-wasapi/win-wasapi.cpp

@@ -319,7 +319,7 @@ bool WASAPISource::TryInitialize()
 	try {
 		Initialize();
 
-	} catch (HRError error) {
+	} catch (HRError &error) {
 		if (previouslyFailed)
 			return active;