Skip to content

Guard GameMenuButtonShop access for clients where the shop button does not exist #20

Description

@Hippoom

Some Vanilla/Turtle WoW clients do not define GameMenuButtonShop. Reforged currently assumes the frame exists when positioning the custom game menu buttons.

On clients without this frame, direct access can cause a Lua error during menu setup.

Expected behavior

Reforged should load cleanly whether or not the client provides GameMenuButtonShop.

Actual behavior

If GameMenuButtonShop is missing, code that calls methods on it can fail.

Proposed fix

Add a nil guard before repositioning the shop button:

if GameMenuButtonShop then
    GameMenuButtonShop:ClearAllPoints()
    GameMenuButtonShop:SetPoint(...)
end

This keeps behavior unchanged on clients that have the shop button and avoids errors on clients that do not.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions