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; } diff --git a/src/multistruct.cpp b/src/multistruct.cpp index 8234dc8f1f4..80781283e15 100644 --- a/src/multistruct.cpp +++ b/src/multistruct.cpp @@ -225,7 +225,7 @@ bool recvLasSat(NETQUEUE queue) return false; } - if (psStruct && psObj && psStruct->pStructureType->psWeapStat[0]->weaponSubClass == WSC_LAS_SAT) + if (psStruct && psObj && isLasSat(psStruct->pStructureType)) { // Lassats have just one weapon unsigned firePause = weaponFirePause(*psStruct->getWeaponStats(0), player);