(cherry picked from commit 0bb40df4bb65e2c784f29baf4e98d7bf84233804)
@@ -45,6 +45,7 @@ struct _PHashTranslationCmp {
void PHashTranslation::generate(const Ref<Translation> &p_from) {
#ifdef TOOLS_ENABLED
+ ERR_FAIL_COND(p_from.is_null());
List<StringName> keys;
p_from->get_message_list(&keys);