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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user