Browse Source

Prevent crash when switching themes.

pull/8479/head
Steven Kirk 4 years ago
parent
commit
1eaf6cc607
  1. 5
      src/Avalonia.Base/StyledElement.cs

5
src/Avalonia.Base/StyledElement.cs

@ -873,9 +873,12 @@ namespace Avalonia
if (applied.Source == styles[i])
{
applied.Dispose();
_appliedStyles.RemoveAt(j);
applied.Dispose();
}
if (j > _appliedStyles.Count)
j = _appliedStyles.Count;
}
}
}

Loading…
Cancel
Save