[locale] Avoid nullptr if there is no location
This commit is contained in:
parent
0c9480aa3f
commit
781d76c9e5
@ -255,6 +255,11 @@ Config::setCurrentLocation( const CalamaresUtils::Locale::TZZone* location )
|
|||||||
LocaleConfiguration
|
LocaleConfiguration
|
||||||
Config::automaticLocaleConfiguration() const
|
Config::automaticLocaleConfiguration() const
|
||||||
{
|
{
|
||||||
|
// Special case: no location has been set at **all**
|
||||||
|
if ( !currentLocation() )
|
||||||
|
{
|
||||||
|
return LocaleConfiguration();
|
||||||
|
}
|
||||||
return LocaleConfiguration::fromLanguageAndLocation(
|
return LocaleConfiguration::fromLanguageAndLocation(
|
||||||
QLocale().name(), supportedLocales(), currentLocation()->country() );
|
QLocale().name(), supportedLocales(), currentLocation()->country() );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user