Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "calling 'GetName' on bad self" #264

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion ItemRack/ItemRack.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,13 @@ end

function ItemRack.MenuMouseover()
local frame = GetMouseFocus()
if MouseIsOver(ItemRackMenuFrame) or IsShiftKeyDown() or (frame and frame:GetName() and frame:IsVisible() and ItemRack.MenuMouseoverFrames[frame:GetName()]) then
local frameName = nil
local frameVisible = nil
local IRmouseOverFrame = nil
if frame then frameName = frame:GetName() end
if frame then frameVisible = frame:IsVisible() end
if frameName then IRmouseOverFrame = ItemRack.MenuMouseoverFrames[frameName] end
if MouseIsOver(ItemRackMenuFrame) or IsShiftKeyDown() or (frame and frameName and frameVisible and IRmouseOverFrame) then
return -- keep menu open if mouse over menu, shift is down or mouse is immediately over a mouseover frame
end
for i in pairs(ItemRack.MenuMouseoverFrames) do
Expand Down