Skip to content

Commit

Permalink
AtlasEngine: Fix nullptr crash when using soft fonts (#15419)
Browse files Browse the repository at this point in the history
Woops. Regressed in #15343. Fixes #15409.

## Validation Steps Performed
* Run `RenderingTests.exe`
* Soft fonts work ✅

(cherry picked from commit 245b13b)
Service-Card-Id: 89323212
Service-Version: 1.18
  • Loading branch information
lhecker authored and DHowett committed May 25, 2023
1 parent 0681596 commit ecdba74
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/renderer/atlas/BackendD3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1145,6 +1145,11 @@ void BackendD3D::_drawTextOverlapSplit(const RenderingPayload& p, u16 y)

void BackendD3D::_initializeFontFaceEntry(AtlasFontFaceEntryInner& fontFaceEntry)
{
if (!fontFaceEntry.fontFace)
{
return;
}

ALLOW_UNINITIALIZED_BEGIN
std::array<u32, 0x100> codepoints;
std::array<u16, 0x100> indices;
Expand Down

0 comments on commit ecdba74

Please sign in to comment.