Kaynağa Gözat

win-wasapi: Catch by reference

Michael Fabian 'Xaymar' Dirks 6 yıl önce
ebeveyn
işleme
00298fd4f1

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

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

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

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