summaryrefslogtreecommitdiffstats
path: root/platform/windows/os_windows.cpp
diff options
context:
space:
mode:
authorSpartan322 <Megacake1234@gmail.com>2024-11-27 13:52:25 -0500
committerSpartan322 <Megacake1234@gmail.com>2024-11-27 13:52:25 -0500
commit721f53fde47c2727d99e3ecccdb789a67df36de0 (patch)
tree55ec5bfa061a5c27272b831e697b78ed1b756a70 /platform/windows/os_windows.cpp
parentb06d20bf39d15ec736d08d4e4fcb32e0c3c1ce1e (diff)
parentf128f383e892865379cb8b14e7bcc9858efe2973 (diff)
downloadredot-engine-721f53fde47c2727d99e3ecccdb789a67df36de0.tar.gz
Merge commit godotengine/godot@f128f383e892865379cb8b14e7bcc9858efe2973
Diffstat (limited to 'platform/windows/os_windows.cpp')
-rw-r--r--platform/windows/os_windows.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index dbd68e56ec..43625b5726 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -1530,7 +1530,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>();
}