Skip to content

Commit 79ab53f

Browse files
committed
Fix an error that can happen when addons are loaded during combat
1 parent 5425eeb commit 79ab53f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

NoAutoclose.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,10 @@ function ns:ADDON_LOADED()
206206
for name, info in pairs(UIPanelWindows) do
207207
self:HandleUIPanel(name, info, flippedUiSpecialFrames);
208208
end
209-
WorldMapFrame:SetAttribute('UIPanelLayout-defined', '1');
210-
WorldMapFrame:SetAttribute('UIPanelLayout-maximizePoint', 'TOP');
209+
if InCombatLockdown() and WorldMapFrame:IsProtected() then
210+
WorldMapFrame:SetAttribute('UIPanelLayout-defined', '1');
211+
WorldMapFrame:SetAttribute('UIPanelLayout-maximizePoint', 'TOP');
212+
end
211213
end
212214

213215
ns.playerInteractionHideMap = {

0 commit comments

Comments
 (0)