Skip to content

Commit a6f1df4

Browse files
committed
sanity check
1 parent d9e712f commit a6f1df4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ClassicCastbars_Options/TestMode.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ end
4040

4141
local function OnDragStop(self)
4242
self:StopMovingOrSizing()
43+
if not self.unitID then return end
4344

4445
-- Frame loses relativity to parent and is instead relative to UIParent after
4546
-- dragging so we can't just use self:GetPoint() here
@@ -49,8 +50,8 @@ local function OnDragStop(self)
4950
ClassicCastbars.db[unit].autoPosition = false
5051

5152
-- Reanchor from UIParent back to parent frame
52-
self:SetParent(self.parent)
5353
self:ClearAllPoints()
54+
self:SetParent(self.parent)
5455
self:SetPoint("CENTER", self.parent, x, y)
5556
end
5657

0 commit comments

Comments
 (0)