Null check for progress reporting when reading log

This commit is contained in:
n00mkrad
2025-11-09 16:06:12 +01:00
parent 2a04e0a4e6
commit 08705f764e

View File

@@ -103,7 +103,7 @@ namespace Flowframes.Ui
{
if (!progressPaused && AiProcess.processTime.IsRunning)
{
string lastLogLine = Logger.GetSessionLogLastLines(logFile, 1)?.Where(x => x.Contains("frame=")).LastOrDefault();
string lastLogLine = Logger.GetSessionLogLastLines(logFile, 1)?.Where(x => x != null && x.Contains("frame=")).LastOrDefault();
int num = lastLogLine == null ? 0 : lastLogLine.Split("frame=")[1].Split("fps=")[0].GetInt();
if(num > 0)