зеркало из https://github.com/DeGsoft/maui-linux.git
Add missing lock in IStyle.Apply
This commit is contained in:
Родитель
dfd34d1fb6
Коммит
2a383f288e
|
@ -85,7 +85,11 @@ namespace Microsoft.Maui.Controls
|
||||||
|
|
||||||
void IStyle.Apply(BindableObject bindable)
|
void IStyle.Apply(BindableObject bindable)
|
||||||
{
|
{
|
||||||
_targets.Add(new WeakReference<BindableObject>(bindable));
|
lock (_targets)
|
||||||
|
{
|
||||||
|
_targets.Add(new WeakReference<BindableObject>(bindable));
|
||||||
|
}
|
||||||
|
|
||||||
if (BaseResourceKey != null)
|
if (BaseResourceKey != null)
|
||||||
bindable.SetDynamicResource(_basedOnResourceProperty, BaseResourceKey);
|
bindable.SetDynamicResource(_basedOnResourceProperty, BaseResourceKey);
|
||||||
ApplyCore(bindable, BasedOn ?? GetBasedOnResource(bindable));
|
ApplyCore(bindable, BasedOn ?? GetBasedOnResource(bindable));
|
||||||
|
|
Загрузка…
Ссылка в новой задаче