From 5deb6497a10981c1137b22e34c9fc91c5e8f8872 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Tue, 10 Dec 2019 21:26:42 +0800 Subject: [PATCH] Fixes crash when using DynamicFont::set_font_data --- scene/resources/dynamic_font.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp index 99a2881d581..75245719565 100644 --- a/scene/resources/dynamic_font.cpp +++ b/scene/resources/dynamic_font.cpp @@ -657,6 +657,7 @@ void DynamicFont::_reload_cache() { if (!data.is_valid()) { data_at_size.unref(); outline_data_at_size.unref(); + fallbacks.resize(0); fallback_data_at_size.resize(0); fallback_outline_data_at_size.resize(0); return;