Fix editor locked by generating preview of dynamic font

This commit is contained in:
volzhs 2020-12-01 01:09:00 +09:00
parent 58ca8de52c
commit a1f63bac0e
1 changed files with 3 additions and 1 deletions

View File

@ -834,7 +834,9 @@ bool EditorFontPreviewPlugin::handles(const String &p_type) const {
Ref<Texture> EditorFontPreviewPlugin::generate_from_path(const String &p_path, const Size2 &p_size) const {
RES res = ResourceLoader::load(p_path);
Ref<ResourceInteractiveLoader> ril = ResourceLoader::load_interactive(p_path);
ril.ptr()->wait();
RES res = ril.ptr()->get_resource();
Ref<DynamicFont> sampled_font;
if (res->is_class("DynamicFont")) {
sampled_font = res->duplicate();