toptensoftware / RichTextKit

Rich text rendering for SkiaSharp
Other
361 stars 74 forks source link

Fixed Incorrect Null Check #72

Closed parentelement closed 1 year ago

parentelement commented 1 year ago

== WHAT == Modified null check in ReplaceText to check the styleToUse variable.

== WHY ==

This previous commit added ad-hoc styling: https://github.com/toptensoftware/RichTextKit/commit/beb262ed21087b1600837a56336900f2c24f3b3a

The null check added inadvertently checks "styledText" which was just created instead of checking the "styleToUse" variable before attempting to apply it.

Vercidium commented 1 year ago

+1, I also had to fix this