diff --git a/src/hb-common.cc b/src/hb-common.cc index 0720237b7..08ec04e41 100644 --- a/src/hb-common.cc +++ b/src/hb-common.cc @@ -381,7 +381,8 @@ hb_language_from_string (const char *str, int len) const char * hb_language_to_string (hb_language_t language) { - /* This is actually nullptr-safe! */ + if (!language) return nullptr; + return language->s; }