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
@@ -17,7 +17,7 @@ local QuestiePlayer = QuestieLoader:ImportModule("QuestiePlayer")
local QuestieQuest = QuestieLoader:ImportModule("QuestieQuest")
local HBD = QuestieCompat.HBD or LibStub("HereBeDragonsQuestie-2.0")
local SharedMedia = LibStub("LibSharedMedia-3.0")
local SharedMedia = LibStub and LibStub("LibSharedMedia-3.0", true)
local atan2 = math.atan2
local pi = math.pi
@@ -807,7 +807,7 @@ function QuestieArrow:UpdateFont()
if not arrowFrame then return end
local fontSize = Questie.db.profile.arrowFontSize or 10
local fontName = Questie.db.profile.arrowFont or "Friz Quadrata TT"
local fontFace = SharedMedia:Fetch("font", fontName) or fontName
local fontFace = (SharedMedia and SharedMedia.Fetch and SharedMedia:Fetch("font", fontName)) or fontName
if arrowFrame.title then
arrowFrame.title:SetFont(fontFace, fontSize, "OUTLINE")
end