From d75654e9605cceb77799c04b47f5898f49a55365 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Tue, 12 Nov 2024 13:36:13 -0500 Subject: [PATCH] displayProximityMsgs: Additional sanity checks --- src/display3d.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/display3d.cpp b/src/display3d.cpp index 6ece53e1847..5588583487d 100644 --- a/src/display3d.cpp +++ b/src/display3d.cpp @@ -2320,7 +2320,15 @@ static void displayProximityMsgs(const glm::mat4& viewMatrix, const glm::mat4 &p unsigned x, y; if (psProxDisp->type == POS_PROXDATA) { + if (!psProxDisp->psMessage->pViewData) + { + continue; + } VIEW_PROXIMITY *pViewProximity = (VIEW_PROXIMITY *)psProxDisp->psMessage->pViewData->pData; + if (!pViewProximity) + { + continue; + } x = pViewProximity->x; y = pViewProximity->y; }