Browse Source

Fixed if clause in ProgressBar.UpdateIsIndeterminate

Found by PVS studio
feature/add-get-pixels-to-IBitmapImpl
Nikita Tsukanov 9 years ago
committed by GitHub
parent
commit
b49a7abbd1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Avalonia.Controls/ProgressBar.cs

2
src/Avalonia.Controls/ProgressBar.cs

@ -112,8 +112,10 @@ namespace Avalonia.Controls
private void UpdateIsIndeterminate(bool isIndeterminate) private void UpdateIsIndeterminate(bool isIndeterminate)
{ {
if (isIndeterminate) if (isIndeterminate)
{
if (_indeterminateAnimation == null || _indeterminateAnimation.Disposed) if (_indeterminateAnimation == null || _indeterminateAnimation.Disposed)
_indeterminateAnimation = IndeterminateAnimation.StartAnimation(this); _indeterminateAnimation = IndeterminateAnimation.StartAnimation(this);
}
else else
_indeterminateAnimation?.Dispose(); _indeterminateAnimation?.Dispose();
} }

Loading…
Cancel
Save