Prechádzať zdrojové kódy

Check PHashTranslation generate p_from is valid

MaxStgs 4 rokov pred
rodič
commit
74bdd611bb
1 zmenil súbory, kde vykonal 1 pridanie a 0 odobranie
  1. 1 0
      core/string/optimized_translation.cpp

+ 1 - 0
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);