Quantcast

- Fix for mapID returning a value when it shouldn't due to Blizzard error. Thank you to Artur for the fix. (Ticket #50)

HonorGoG [10-19-21 - 03:07]
- Fix for mapID returning a value when it shouldn't due to Blizzard error.  Thank you to Artur for the fix.  (Ticket #50)
Filename
TitanClassicLocation/TitanClassicLocation.lua
diff --git a/TitanClassicLocation/TitanClassicLocation.lua b/TitanClassicLocation/TitanClassicLocation.lua
index 8aadfe8..1880fc2 100755
--- a/TitanClassicLocation/TitanClassicLocation.lua
+++ b/TitanClassicLocation/TitanClassicLocation.lua
@@ -71,7 +71,7 @@ end
 -- **************************************************************************
 function TitanPanelLocationButton_OnShow()
 	local mapID = C_Map.GetBestMapForUnit("player");
-	if mapID ~= nil then
+	if mapID ~= nil and C_Map.MapHasArt(mapID) then
     	WorldMapFrame:SetMapID(mapID);
 	end
 	TitanPanelLocation_HandleUpdater();
@@ -198,7 +198,7 @@ function TitanPanelLocationButton_OnEvent(self, event, ...)
 	end
 	if TitanGetVar(TITAN_LOCATION_ID, "UpdateWorldmap") then
 		local mapID = C_Map.GetBestMapForUnit("player")
-		if mapID ~= nil then
+		if mapID ~= nil and C_Map.MapHasArt(mapID) then
     		WorldMapFrame:SetMapID(mapID);
 		end
 	end