mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-30 10:55:37 -04:00
[locale] Avoid nullptr deref
- when no location has been set at all, there's no sensible TZ to report; just leave it blank. In *practice* you won't hit this code from the Calamares UI before a location has been set, because the Config object is instantiated and then immediately configured, but from tests or unusual UIs it could be.
This commit is contained in:
parent
b36ad4c7f4
commit
eda14ce548
1 changed files with 3 additions and 1 deletions
|
@ -318,7 +318,9 @@ Config::setLCLocaleExplicitly( const QString& locale )
|
||||||
QString
|
QString
|
||||||
Config::currentLocationStatus() const
|
Config::currentLocationStatus() const
|
||||||
{
|
{
|
||||||
return tr( "Set timezone to %1/%2." ).arg( m_currentLocation->region(), m_currentLocation->zone() );
|
return tr( "Set timezone to %1/%2." )
|
||||||
|
.arg( m_currentLocation ? m_currentLocation->region() : QString(),
|
||||||
|
m_currentLocation ? m_currentLocation->zone() : QString() );
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline QString
|
static inline QString
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue