Skip to content

Commit

Permalink
clipDroidOnScreen: Additional null check
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Oct 24, 2024
1 parent 91fb3a1 commit 4468c15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/display3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1775,7 +1775,7 @@ bool clipDroidOnScreen(DROID *psDroid, const glm::mat4 &perspectiveViewModelMatr
/* Get its absolute dimensions */
// NOTE: This only takes into account body, but is "good enough"
const BODY_STATS *psBStats = psDroid->getBodyStats();
const iIMDShape * pIMD = (psBStats != nullptr) ? psBStats->pIMD->displayModel() : nullptr;
const iIMDShape * pIMD = (psBStats != nullptr && psBStats->pIMD != nullptr) ? psBStats->pIMD->displayModel() : nullptr;

return clipShapeOnScreen(pIMD, perspectiveViewModelMatrix, overdrawScreenPoints);
}
Expand Down

0 comments on commit 4468c15

Please sign in to comment.