Skip to content

Commit

Permalink
Prevent crash if IMD is bad for renderExplosionEffect()
Browse files Browse the repository at this point in the history
  • Loading branch information
KJeff01 committed Feb 27, 2024
1 parent 858487a commit fd926a8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/effects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1534,6 +1534,11 @@ static void renderExplosionEffect(const EFFECT *psEffect, const glm::mat4 &viewM
{
const PIELIGHT brightness = WZCOL_WHITE;

if (psEffect == nullptr || psEffect->imd == nullptr)
{
return;
}

if (psEffect->type == EXPLOSION_TYPE_LAND_LIGHT)
{
if (rejectLandLight((LAND_LIGHT_SPEC)psEffect->specific))
Expand Down

0 comments on commit fd926a8

Please sign in to comment.