Avoid crash on tests with no TZ set
This commit is contained in:
parent
80816a205b
commit
12f18b325b
1 changed files with 4 additions and 0 deletions
|
@ -613,6 +613,10 @@ void TimeManager::updateLocalTime()
|
|||
void TimeManager::updateLocalTimeString()
|
||||
{
|
||||
time_t cur_time = _impl->get_cur_time();
|
||||
if (!_impl->get_zonename()) {
|
||||
return;
|
||||
}
|
||||
|
||||
struct tm* aircraftLocalTime = fgLocaltime(&cur_time, _impl->get_zonename());
|
||||
static char buf[16];
|
||||
snprintf(buf, 16, "%.2d:%.2d:%.2d",
|
||||
|
|
Loading…
Add table
Reference in a new issue