Fix LSM30:Fetch guards - also check LSM30.Fetch exists before calling
Previous guard only checked LSM30 ~= nil; if Fetch method is absent on the stub object the call still crashes. Now uses full 3-part check: (LSM30 and LSM30.Fetch and LSM30:Fetch(...)) or fallback Matches the pattern already used in QuestieArrow.lua.
This commit is contained in:
@@ -163,7 +163,7 @@ function TrackerQuestTimers:UpdateTimerFrame()
|
||||
local timeRemainingString, timeRemaining = TrackerQuestTimers:GetRemainingTimeByQuestId(timer.questId)
|
||||
if timeRemainingString ~= nil then
|
||||
Questie:Debug(Questie.DEBUG_SPAM, "[TrackerQuestTimers:UpdateTimerFrame] - ", timeRemainingString)
|
||||
timer.frame.label:SetFont(LSM30 and LSM30:Fetch("font", Questie.db.profile.trackerFontObjective) or Questie.db.profile.trackerFontObjective, Questie.db.profile.trackerFontSizeObjective, Questie.db.profile.trackerFontOutline)
|
||||
timer.frame.label:SetFont((LSM30 and LSM30.Fetch and LSM30:Fetch("font", Questie.db.profile.trackerFontObjective)) or Questie.db.profile.trackerFontObjective, Questie.db.profile.trackerFontSizeObjective, Questie.db.profile.trackerFontOutline)
|
||||
timer.frame.label:SetText(Questie:Colorize(timeRemainingString, "blue"))
|
||||
timer.frame:SetWidth(timer.frame.label:GetWidth() + ((34) - (18 - Questie.db.profile.trackerFontSizeQuest)) + Questie.db.profile.trackerFontSizeQuest)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user