mirror of
https://github.com/parchlinux/calamares.git
synced 2025-07-01 03:15:37 -04:00
[locale] Avoid nullptr if there is no location
This commit is contained in:
parent
0c9480aa3f
commit
781d76c9e5
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue