diff options
Diffstat (limited to 'docview/components/richtext/RichTextStyleUnit.pas')
-rw-r--r-- | docview/components/richtext/RichTextStyleUnit.pas | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/docview/components/richtext/RichTextStyleUnit.pas b/docview/components/richtext/RichTextStyleUnit.pas index 70813b32..cf5e8a7e 100644 --- a/docview/components/richtext/RichTextStyleUnit.pas +++ b/docview/components/richtext/RichTextStyleUnit.pas @@ -462,7 +462,11 @@ begin NewFont := fpgApplication.DefaultFont; if FontSame( NewFont, AFont ) then - exit; // no change + begin + if AFont <> NewFont then { they are not the same instance } + NewFont.Free; + Exit; // no change needed + end; AFont.Free; AFont := NewFont; |