mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-06 14:34:05 +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){
|
||||
if (!ignorePlaybackError && PlaybackError != null){
|
||||
if (!ignorePlaybackError){
|
||||
PlaybackErrorEventArgs args = new PlaybackErrorEventArgs(message);
|
||||
PlaybackError(this, args);
|
||||
PlaybackError?.Invoke(this, args);
|
||||
ignorePlaybackError = args.Ignore;
|
||||
}
|
||||
}
|
||||
|
@ -102,9 +102,9 @@ private void OnNotificationSoundError(string message){
|
||||
if (wasTryingToPlay){
|
||||
wasTryingToPlay = false;
|
||||
|
||||
if (!ignorePlaybackError && PlaybackError != null){
|
||||
if (!ignorePlaybackError){
|
||||
PlaybackErrorEventArgs args = new PlaybackErrorEventArgs(message);
|
||||
PlaybackError(this, args);
|
||||
PlaybackError?.Invoke(this, args);
|
||||
ignorePlaybackError = args.Ignore;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user