Merge pull request #48413 from MaxStgs/phash_master

Check OptimizedTranslation generate p_from is valid
This commit is contained in:
Rémi Verschelde 2021-05-03 20:33:30 +02:00 committed by GitHub
commit 530d9c312e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,6 +46,7 @@ void OptimizedTranslation::generate(const Ref<Translation> &p_from) {
// This method compresses a Translation instance.
// Right now, it doesn't handle context or plurals, so Translation subclasses using plurals or context (i.e TranslationPO) shouldn't be compressed.
#ifdef TOOLS_ENABLED
ERR_FAIL_COND(p_from.is_null());
List<StringName> keys;
p_from->get_message_list(&keys);