Browse Source
Merge pull request #10601 from timunie/fix/ToolTipService_NRE
Fix NRE in ToolTipService
pull/10607/head
Max Katz
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
4 deletions
-
src/Avalonia.Controls/ToolTipService.cs
|
|
|
@ -42,11 +42,12 @@ namespace Avalonia.Controls |
|
|
|
{ |
|
|
|
Close(control); |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
var tip = control.GetValue(ToolTip.ToolTipProperty); |
|
|
|
|
|
|
|
tip!.Content = e.NewValue; |
|
|
|
if (control.GetValue(ToolTip.ToolTipProperty) is { } tip) |
|
|
|
{ |
|
|
|
tip.Content = e.NewValue; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|