1
0
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 ()

* Fix V3083 warnings from PVS-Studio Static Analyzer
This commit is contained in:
Alexander 2017-10-30 01:32:18 +07:00 committed by Daniel Chýlek
parent e6655219ee
commit 54c1137927
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}
}

View File

@ -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;
}
}