From e04572b1f0fcb63ec3a489b175de5150a0b80d8d Mon Sep 17 00:00:00 2001 From: Alar of Daggerspine Date: Thu, 3 Sep 2015 21:42:43 +0200 Subject: [PATCH] Safety around GarrisonMissionButton_AddThreatsToTooltip Signed-off-by: Alar of Daggerspine --- GarrisonCommander.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/GarrisonCommander.lua b/GarrisonCommander.lua index 32d05b7..4a812da 100644 --- a/GarrisonCommander.lua +++ b/GarrisonCommander.lua @@ -1384,9 +1384,7 @@ do print(message) end releaseEvents() - - - end + end --@debug@ print(this.frame,this.frame:GetName()) --@end-debug@ @@ -1830,7 +1828,7 @@ local fakeinfo={followerID=false} local fakeframe={} function addon:FillMissionPage(missionInfo) - + --@debug@ print("FillMissionPage",missionInfo) --@end-debug@ @@ -2489,7 +2487,10 @@ function addon:ScriptGarrisonMissionButton_OnEnter(this, button) else GameTooltip:SetText(this.info.name); GameTooltip:AddLine(string.format(GARRISON_MISSION_TOOLTIP_NUM_REQUIRED_FOLLOWERS, this.info.numFollowers), 1, 1, 1); - GarrisonMissionButton_AddThreatsToTooltip(this.info.missionID, GarrisonMissionFrame:GetFollowerType()); + local rc,message=pcall(GarrisonMissionButton_AddThreatsToTooltip,this.info.missionID, GarrisonMissionFrame:GetFollowerType()); + --@debug@ + if not rc then GameTooltip:AddLine(message) end + --@end-debug@ GameTooltip:AddLine(GARRISON_MISSION_AVAILABILITY); GameTooltip:AddLine(this.info.offerTimeRemaining, 1, 1, 1); addon:AddFollowersToTooltip(this.info.missionID,LE_FOLLOWER_TYPE_GARRISON_6_0 or 0) -- 1.7.9.5