diff --git a/modules/map.lua b/modules/map.lua index e47db33c..1eece674 100644 --- a/modules/map.lua +++ b/modules/map.lua @@ -126,10 +126,12 @@ pfUI:RegisterModule("map", "vanilla:tbc", function () local scale = WorldMapButton:GetEffectiveScale() local x, y = GetCursorPosition() - mx = (( x / scale ) - ( mx - width / 2)) / width * 100 - my = (( my + height / 2 ) - ( y / scale )) / height * 100 + if mx and my then + mx = (( x / scale ) - ( mx - width / 2)) / width * 100 + my = (( my + height / 2 ) - ( y / scale )) / height * 100 + end - if MouseIsOver(WorldMapButton) then + if mx and my and MouseIsOver(WorldMapButton) then WorldMapButton.coords.text:SetText(string.format('%.1f / %.1f', mx, my)) else WorldMapButton.coords.text:SetText("")