Skip to content

XTextFormatter : block.Text.Trim() can throw a NullReferenceException since 1.3.67Β #473

@DjeeBay

Description

@DjeeBay

Hi,

In the DrawString method, if the string text parameter contains \r\n it will throw a NullReferenceException.
The new code in XTextFormatter.cs L.231 does a block.Text.Trim() but the Text property is null when block.Type is BlockType.LineBreak.

There are maybe other cases where Text can be null but LineBreak is the first I've encountered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions