From 3ad43a33ae9ae835f6352e62e9be7ab07aa13620 Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Wed, 28 Feb 2018 15:20:13 +0100 Subject: [PATCH] check `language` variable to avoid SIGILL in '-fsanitize-trap=integer,undefined' builds. --- include/mapnik/text/harfbuzz_shaper.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mapnik/text/harfbuzz_shaper.hpp b/include/mapnik/text/harfbuzz_shaper.hpp index 41fac9565..d60e8b7d8 100644 --- a/include/mapnik/text/harfbuzz_shaper.hpp +++ b/include/mapnik/text/harfbuzz_shaper.hpp @@ -186,7 +186,7 @@ static void shape_text(text_line & line, auto script = detail::_icu_script_to_script(text_item.script); auto language = detail::script_to_language(script); MAPNIK_LOG_DEBUG(harfbuzz_shaper) << "RUN:[" << text_item.start << "," << text_item.end << "]" - << " LANGUAGE:" << hb_language_to_string(language) + << " LANGUAGE:" << ((language != nullptr) ? hb_language_to_string(language) : "unknown") << " SCRIPT:" << script << "(" << text_item.script << ") " << uscript_getShortName(text_item.script) << " FONT:" << face->family_name(); if (language != HB_LANGUAGE_INVALID)