Make sure codecForLocale returns a valid codec in bootstrap mode

This was a regression caused by acbfb4d777,
causing for instance qdoc to crash.

Change-Id: Id8daa19d467c4f1729e5a5a203a388f16ec4a6de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
bb10
Jan-Arve Saether 2012-08-06 09:50:50 +02:00 committed by Qt by Nokia
parent 195663260c
commit 57265a20cb
1 changed files with 1 additions and 1 deletions

View File

@ -249,10 +249,10 @@ static QTextCodec *setupLocaleMapper()
locale = checkForCodec("ISO 8859-15");
}
#endif
// If everything failed, we default to 8859-1
if (!locale)
locale = QTextCodec::codecForName("ISO 8859-1");
#endif
globalData->codecForLocale.storeRelease(locale);
return locale;
}