Browse Source

Add additional null check as Tip may be null in some situations

see https://github.com/AvaloniaUI/Avalonia/issues/10598
pull/10601/head
Tim 4 years ago
parent
commit
a76eb7f587
  1. 9
      src/Avalonia.Controls/ToolTipService.cs

9
src/Avalonia.Controls/ToolTipService.cs

@ -42,11 +42,12 @@ namespace Avalonia.Controls
{ {
Close(control); Close(control);
} }
else else
{ {
var tip = control.GetValue(ToolTip.ToolTipProperty); if (control.GetValue(ToolTip.ToolTipProperty) is { } tip)
{
tip!.Content = e.NewValue; tip.Content = e.NewValue;
}
} }
} }
} }

Loading…
Cancel
Save