Fix crash when using get_available_chars with invalid DynamicFontData

(cherry picked from commit bec1dcb6f6)
This commit is contained in:
Haoyu Qiu 2021-05-21 10:22:20 +08:00 committed by Rémi Verschelde
parent 418e044789
commit e14d5062f7
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -265,6 +265,10 @@ Size2 DynamicFontAtSize::get_char_size(CharType p_char, CharType p_next, const V
}
String DynamicFontAtSize::get_available_chars() const {
if (!valid) {
return "";
}
String chars;
FT_UInt gindex;