Add feedback from PVS (static code analyzer)

https://pvs-studio.com/en/blog/posts/cpp/1153/
This commit is contained in:
Wojtek Figat
2024-08-15 13:01:40 +02:00
parent 0b03a5da0d
commit 45e83d6d15
9 changed files with 15 additions and 16 deletions

View File

@@ -662,13 +662,13 @@ bool FlaxStorage::LoadAssetChunk(FlaxChunk* chunk)
if (!failed)
{
stream->SetPosition(chunk->LocationInFile.Address);
if (!stream->HasError())
break;
}
if (!stream->HasError())
break;
}
}
if (stream->HasError())
if (!stream || stream->HasError())
{
failed = true;
UnlockChunks();