diff options
author | MaxStgs <peters2011.pm@gmail.com> | 2021-05-03 20:40:21 +0500 |
---|---|---|
committer | MaxStgs <peters2011.pm@gmail.com> | 2021-05-03 20:40:21 +0500 |
commit | 74bdd611bbec09a9a147830098eca7299aafd59e (patch) | |
tree | 7e4641abb23470d9769b8cd7c94ab7aa8702f178 | |
parent | eb57dcdb909dd45eaff6e25858a1907e13df4f59 (diff) |
Check PHashTranslation generate p_from is valid
-rw-r--r-- | core/string/optimized_translation.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/string/optimized_translation.cpp b/core/string/optimized_translation.cpp index 53d0a8924d..268562d971 100644 --- a/core/string/optimized_translation.cpp +++ b/core/string/optimized_translation.cpp @@ -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); |