Guard all LibSharedMedia-3.0 usages against nil LSM - OptionalDep may not load

- Use LibStub(..., true) silent flag on all LSM acquisition sites
- Guard HashTable() calls in Options files (returns nil if no font type registered)
- Guard all Fetch() call sites with inline 'LSM30 and LSM30:Fetch() or fallback'
- Make font values lazy functions in options dropdowns so LSM has time to register
- Affects: QuestieOptionsTracker, QuestieOptionsArrow, QuestieArrow, QuestieTracker,
  TrackerHeaderFrame, TrackerLinePool, TrackerQuestTimers
This commit is contained in:
Xurkon
2026-04-24 04:24:38 -05:00
parent 97c8f60a28
commit a2a325c8ab
6 changed files with 22 additions and 17 deletions
+2 -2
View File
@@ -48,7 +48,7 @@ local GetQuestLogTitle = QuestieCompat.GetQuestLogTitle
local GetQuestLogIndexByID = QuestieCompat.GetQuestLogIndexByID
local GetItemInfo = QuestieCompat.GetItemInfo
local LSM30 = LibStub("LibSharedMedia-3.0")
local LSM30 = LibStub and LibStub("LibSharedMedia-3.0", true)
-- Local Vars
local trackerLineWidth = 0
@@ -1275,7 +1275,7 @@ function QuestieTracker:Update()
line.label:SetPoint("TOPLEFT", line, "TOPLEFT", lineWidthQBC, 0)
-- Set Timer font
line.label:SetFont(LSM30:Fetch("font", Questie.db.profile.trackerFontObjective),
line.label:SetFont(LSM30 and LSM30:Fetch("font", Questie.db.profile.trackerFontObjective) or Questie.db.profile.trackerFontObjective,
Questie.db.profile.trackerFontSizeObjective, Questie.db.profile.trackerFontOutline)
-- Set Timer Title based on states