From 59b997fb6ce737f91ea0ed8a01ca9c8f9694c19e Mon Sep 17 00:00:00 2001 From: Ahmet Sait Date: Mon, 6 May 2024 22:48:54 +0300 Subject: [PATCH] Fix null error when resetting font in designer --- Scintilla.NET/Scintilla.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Scintilla.NET/Scintilla.cs b/Scintilla.NET/Scintilla.cs index eaf4063..2ae4c37 100644 --- a/Scintilla.NET/Scintilla.cs +++ b/Scintilla.NET/Scintilla.cs @@ -4738,6 +4738,7 @@ public override Font Font set { var defaultFontStyle = Styles[Style.Default]; + value = value ?? Parent?.Font ?? Control.DefaultFont; defaultFontStyle.Font = value.Name; defaultFontStyle.SizeF = value.Size; defaultFontStyle.Bold = value.Bold;