From 0f85a4603d094aa72727b8ac84b35ea5eab8f376 Mon Sep 17 00:00:00 2001 From: Max Katz Date: Wed, 30 Aug 2023 19:18:03 -0700 Subject: [PATCH] Make WindowNotificationManager(TopLevel) ctor nullable as it was before --- .../Notifications/WindowNotificationManager.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Avalonia.Controls/Notifications/WindowNotificationManager.cs b/src/Avalonia.Controls/Notifications/WindowNotificationManager.cs index cb7ade44b3..6d9a030ead 100644 --- a/src/Avalonia.Controls/Notifications/WindowNotificationManager.cs +++ b/src/Avalonia.Controls/Notifications/WindowNotificationManager.cs @@ -54,9 +54,12 @@ namespace Avalonia.Controls.Notifications /// Initializes a new instance of the class. /// /// The TopLevel that will host the control. - public WindowNotificationManager(TopLevel host) : this() + public WindowNotificationManager(TopLevel? host) : this() { - InstallFromTopLevel(host); + if (host is not null) + { + InstallFromTopLevel(host); + } } ///