summaryrefslogtreecommitdiffstats
path: root/core/string
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-05-03 20:33:30 +0200
committerGitHub <noreply@github.com>2021-05-03 20:33:30 +0200
commit530d9c312e18691368a0077da701c8dbf852d364 (patch)
treebd4638ab6eb4b7260b1912c8385d5ab670168be3 /core/string
parenta36c084f753dbafb2000f0e404cf69e28efa23ad (diff)
parent74bdd611bbec09a9a147830098eca7299aafd59e (diff)
downloadredot-engine-530d9c312e18691368a0077da701c8dbf852d364.tar.gz
Merge pull request #48413 from MaxStgs/phash_master
Check OptimizedTranslation generate p_from is valid
Diffstat (limited to 'core/string')
-rw-r--r--core/string/optimized_translation.cpp1
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);