mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-06-06 17:34:06 +02:00
Fix warning about possible null reference in audio playback error event (#174)
* Fix V3083 warnings from PVS-Studio Static Analyzer
This commit is contained in:
parent
e6655219ee
commit
54c1137927
lib/TweetLib.Audio/Impl
@ -43,9 +43,9 @@ protected override void Dispose(bool disposing){
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void OnNotificationSoundError(string message){
|
private void OnNotificationSoundError(string message){
|
||||||
if (!ignorePlaybackError && PlaybackError != null){
|
if (!ignorePlaybackError){
|
||||||
PlaybackErrorEventArgs args = new PlaybackErrorEventArgs(message);
|
PlaybackErrorEventArgs args = new PlaybackErrorEventArgs(message);
|
||||||
PlaybackError(this, args);
|
PlaybackError?.Invoke(this, args);
|
||||||
ignorePlaybackError = args.Ignore;
|
ignorePlaybackError = args.Ignore;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,9 +102,9 @@ private void OnNotificationSoundError(string message){
|
|||||||
if (wasTryingToPlay){
|
if (wasTryingToPlay){
|
||||||
wasTryingToPlay = false;
|
wasTryingToPlay = false;
|
||||||
|
|
||||||
if (!ignorePlaybackError && PlaybackError != null){
|
if (!ignorePlaybackError){
|
||||||
PlaybackErrorEventArgs args = new PlaybackErrorEventArgs(message);
|
PlaybackErrorEventArgs args = new PlaybackErrorEventArgs(message);
|
||||||
PlaybackError(this, args);
|
PlaybackError?.Invoke(this, args);
|
||||||
ignorePlaybackError = args.Ignore;
|
ignorePlaybackError = args.Ignore;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user