From 3c1c183f88f3218f9d8c07a880d51e995ab34dc9 Mon Sep 17 00:00:00 2001 From: Flamanis Date: Sat, 8 Jun 2024 19:15:55 -0500 Subject: [PATCH] Add exist check for definition id --- Libs/LibOpenRaid/GetPlayerInformation.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Libs/LibOpenRaid/GetPlayerInformation.lua b/Libs/LibOpenRaid/GetPlayerInformation.lua index 4eba5328..11df4b30 100644 --- a/Libs/LibOpenRaid/GetPlayerInformation.lua +++ b/Libs/LibOpenRaid/GetPlayerInformation.lua @@ -162,11 +162,13 @@ local getDragonflightTalentsAsIndexTable = function() local definitionId = traitEntryInfo.definitionID --definition info - local traitDefinitionInfo = C_Traits.GetDefinitionInfo(definitionId) - local spellId = traitDefinitionInfo.overriddenSpellID or traitDefinitionInfo.spellID - local spellName, _, spellTexture = GetSpellInfo(spellId) - if (spellName) then - allTalents[#allTalents+1] = spellId + if (definitionId) then + local traitDefinitionInfo = C_Traits.GetDefinitionInfo(definitionId) + local spellId = traitDefinitionInfo.overriddenSpellID or traitDefinitionInfo.spellID + local spellName, _, spellTexture = GetSpellInfo(spellId) + if (spellName) then + allTalents[#allTalents+1] = spellId + end end end end