CUST: - corrected check for LutCrc is null or empty if LUT not required

This commit is contained in:
Thomas Wiedebusch 2023-11-27 17:02:01 +01:00
parent 0c4ff9d91d
commit efbd0f2372
5 changed files with 4 additions and 1 deletions

View File

@ -4360,6 +4360,9 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
/// <remarks date="2023-Nov-22" author="Thomas Wiedebusch">
/// - Taking meter response of invalid LUT file indicated by 0x8000xxxx.
/// </remarks>
/// <remarks date="2023-Nov-27" author="Thomas Wiedebusch">
/// - Added check for string LutCrc is not null or empty.
/// </remarks>
private void RestoreLutFile(ProcessState successExitState, ProcessState errorExitState = ProcessState.Error)
{
// Remind the invoker being able to generate error messages based on the last state
@ -4368,7 +4371,7 @@ namespace Xylem.ServiceFwUpdate.Ui.ServiceFwUpdateSw
// 1. LUT file is invalid indicated by CRC
if (_currentGenesis.LutCrc.Contains(MeterLutFile.StrLutFileInvalidCrc))
if (!string.IsNullOrEmpty(_currentGenesis.LutCrc) && _currentGenesis.LutCrc.Contains(MeterLutFile.StrLutFileInvalidCrc))
{
InfoProcessFailed(lblLutFileCheck, Resources.StrLutFileNotInstalled);
_processState = errorExitState;