mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-30 10:55: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
|
||||
Config::automaticLocaleConfiguration() const
|
||||
{
|
||||
// Special case: no location has been set at **all**
|
||||
if ( !currentLocation() )
|
||||
{
|
||||
return LocaleConfiguration();
|
||||
}
|
||||
return LocaleConfiguration::fromLanguageAndLocation(
|
||||
QLocale().name(), supportedLocales(), currentLocation()->country() );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue