diff options
author | Hunt J. Sparra <19802403+HuntJSparra@users.noreply.github.com> | 2024-11-05 14:21:44 -0500 |
---|---|---|
committer | Hunt J. Sparra <19802403+HuntJSparra@users.noreply.github.com> | 2024-11-21 18:09:03 -0500 |
commit | 48fbe4172b682ca319316a1f129f622e240ebad7 (patch) | |
tree | bd806245d5f768c0a3817ed99575ef057fd2c85b /platform/windows | |
parent | 9e6098432aac35bae42c9089a29ba2a80320d823 (diff) | |
download | redot-engine-48fbe4172b682ca319316a1f129f622e240ebad7.tar.gz |
Register Engine, OS, ProjectSettings, and Time early.
Diffstat (limited to 'platform/windows')
-rw-r--r-- | platform/windows/os_windows.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index a25b7ea4ca..ca6fc2111b 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -1540,7 +1540,8 @@ DWRITE_FONT_STRETCH OS_Windows::_stretch_to_dw(int p_stretch) const { } Vector<String> OS_Windows::get_system_font_path_for_text(const String &p_font_name, const String &p_text, const String &p_locale, const String &p_script, int p_weight, int p_stretch, bool p_italic) const { - if (!dwrite2_init) { + // This may be called before TextServerManager has been created, which would cause a crash downstream if we do not check here + if (!dwrite2_init || !TextServerManager::get_singleton()) { return Vector<String>(); } |