Fixed an issue in the backend of the addon

This commit is contained in:
Tercio Jose
2024-05-27 18:39:22 -03:00
parent 82be7ed472
commit cd16ce7590
+4 -1
View File
@@ -916,7 +916,10 @@ function segmentClass:ResetAllCombatData()
for i = #segmentsTable, 1, -1 do
---@type combat
local thisCombatObject = segmentsTable[i]
Details:DestroyCombat(thisCombatObject)
--check if the combat is already destroyed
if (not thisCombatObject.__destroyed) then
Details:DestroyCombat(thisCombatObject)
end
end
--the current combat when finished will be moved to the first index of "segmentsTable", need the check if the current combat was already destroyed