From 8ba392f33d28bd114aa296ea30c123b39b969ac6 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Tue, 16 Mar 2021 21:11:09 +0200 Subject: [PATCH] abort on failure to detect codec for locale Signed-off-by: Ivailo Monev --- src/core/codecs/qtextcodec.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/codecs/qtextcodec.cpp b/src/core/codecs/qtextcodec.cpp index c3a3f135d..e622f0f23 100644 --- a/src/core/codecs/qtextcodec.cpp +++ b/src/core/codecs/qtextcodec.cpp @@ -126,7 +126,9 @@ static void setupLocaleMapper() // nl_langinfo() is documented to return empty string only if its argument // is not valid - Q_ASSERT(localeMapper); + if (!localeMapper) { + qFatal("Could not detect codec for locale"); + } } /*!