Fixed bad optional acces, fixes #459
This commit is contained in:
@@ -263,11 +263,9 @@ namespace lms::scanner
|
||||
|
||||
{
|
||||
std::unique_lock lock{ _statusMutex };
|
||||
_curState = State::InProgress;
|
||||
_nextScheduledScan = {};
|
||||
}
|
||||
|
||||
|
||||
LMS_LOG(UI, INFO, "New scan started!");
|
||||
|
||||
refreshScanSettings();
|
||||
@@ -396,6 +394,8 @@ namespace lms::scanner
|
||||
{
|
||||
{
|
||||
std::unique_lock lock{ _statusMutex };
|
||||
|
||||
_curState = State::InProgress;
|
||||
_currentScanStepStats = stepStats;
|
||||
}
|
||||
|
||||
|
||||
@@ -249,6 +249,8 @@ namespace lms::ui
|
||||
break;
|
||||
|
||||
case IScannerService::State::InProgress:
|
||||
assert(status.currentScanStepStats);
|
||||
|
||||
_status->setText(Wt::WString::tr("Lms.Admin.ScannerController.status-in-progress")
|
||||
.arg(status.currentScanStepStats->stepIndex + 1)
|
||||
.arg(scanner::ScanProgressStepCount));
|
||||
|
||||
Reference in New Issue
Block a user