Skip to content

Commit

Permalink
Fixes #68 - Implement check for nil parent in GetMapUntil()
Browse files Browse the repository at this point in the history
  • Loading branch information
DanSheps committed Nov 2, 2018
1 parent 96d5898 commit 622cf75
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion BeStride.lua
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,12 @@ end
function BeStride:GetMapUntil(locID,filter)
local map = C_Map.GetMapInfo(locID)
if map.mapType ~= filter and map.mapType > filter and map.parentMapID ~= nil and map.parentMapID ~= 0 then
return BeStride:GetMapUntil(map.parentMapID,filter)
local parentMap = self:GetMapUntil(map.parentMapID,filter)
if parentMap ~= nil then
return parentMap
else
return map
end
else
return map
end
Expand Down

0 comments on commit 622cf75

Please sign in to comment.