Skip to content

Commit

Permalink
Fix code scanning alert no. 98: Potential use after free
Browse files Browse the repository at this point in the history
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
1 parent ebc8083 commit 2c5b7fe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tiberiandawn/terrain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ void TerrainClass::AI(void)
*/
if (IsCrumbling && Fetch_Stage() == Get_Build_Frame_Count(Class->Get_Image_Data()) - 1) {
delete this;
return;
}
}

Expand Down

0 comments on commit 2c5b7fe

Please sign in to comment.