diff --git a/ReallifeGamemode.Client/Interaction/factioninteraction.ts b/ReallifeGamemode.Client/Interaction/factioninteraction.ts index aa577562..392030df 100644 --- a/ReallifeGamemode.Client/Interaction/factioninteraction.ts +++ b/ReallifeGamemode.Client/Interaction/factioninteraction.ts @@ -469,11 +469,13 @@ export default function factionInteraction(globalData: IGlobalData) { }); mp.events.add("destroyMedicTaskCheckpoint", () => { - activeCheckpoint.destroy(); - activeCheckpoint = null; - activeTask = null; - timeLeft = null; - mp.events.callRemote("MedicTaskTimeout"); + if (activeCheckpoint) { + activeCheckpoint.destroy(); + activeCheckpoint = null; + activeTask = null; + timeLeft = null; + mp.events.callRemote("MedicTaskTimeout"); + } }); mp.events.add('playerEnterCheckpoint', (activeCheckpoint) => {