Browse Source

Fix stale dynamic font reference fetch from cache

Seems to fix issue 15392

(cherry picked from commit 526e637a9758482c1eb408eaa2d584b0340e7fcd)
Bernhard Liebl 7 years ago
parent
commit
bc0af4a73e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scene/resources/dynamic_font.cpp

+ 1 - 1
scene/resources/dynamic_font.cpp

@@ -614,8 +614,8 @@ DynamicFontAtSize::~DynamicFontAtSize() {
 
 
 	if (valid) {
 	if (valid) {
 		FT_Done_FreeType(library);
 		FT_Done_FreeType(library);
-		font->size_cache.erase(id);
 	}
 	}
+	font->size_cache.erase(id);
 }
 }
 
 
 /////////////////////////
 /////////////////////////