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 a509748 commit a0a42c1
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 a0a42c1

Please sign in to comment.