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