From d2cdb85678f7d99f76a3a3b988958ffae7a05e79 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Sat, 18 Apr 2026 23:51:56 +0200 Subject: [PATCH] Fix reference on font asset unload 28ea7f134d6780ce4cd8cade69898de39b61fef2 #4059 --- Source/Engine/Render2D/FontAsset.cpp | 1 + Source/Engine/Render2D/FontAsset.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Engine/Render2D/FontAsset.cpp b/Source/Engine/Render2D/FontAsset.cpp index b8edf0448..34ffe7330 100644 --- a/Source/Engine/Render2D/FontAsset.cpp +++ b/Source/Engine/Render2D/FontAsset.cpp @@ -69,6 +69,7 @@ void FontAsset::unload(bool isReloading) _fontFile.Release(); _virtualBold = nullptr; _virtualItalic = nullptr; + _virtualMSDF = nullptr; } AssetChunksFlag FontAsset::getChunksToPreload() const diff --git a/Source/Engine/Render2D/FontAsset.h b/Source/Engine/Render2D/FontAsset.h index 44ffbbdd1..c3aa141a8 100644 --- a/Source/Engine/Render2D/FontAsset.h +++ b/Source/Engine/Render2D/FontAsset.h @@ -182,7 +182,7 @@ public: API_FUNCTION() FontAsset* GetItalic(); /// - /// Gets the MSDF version of the font. Returns itself or creates a new virtual font asset using this font but rasterized with MSDF. + /// Gets the MSDF version of the font. Returns itself or creates a new virtual font asset using this font but rasterized with Multi-channel Signed Distance Field (MSDF). /// /// The virtual font or this. API_FUNCTION() FontAsset* GetMSDF();