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

When minimap is disabled in configuration, really disable it #5771

Merged
merged 2 commits into from May 19, 2017

Conversation

nerzhul
Copy link
Member

@nerzhul nerzhul commented May 18, 2017

We instanciate & create object, only rendering is now totally done. Here really disable it when configuration told us.

@nerzhul nerzhul added this to the 0.4.16 milestone May 18, 2017
@nerzhul nerzhul requested a review from SmallJoker May 18, 2017 17:50
@@ -51,7 +51,8 @@ ClientScripting::ClientScripting(Client *client):
InitializeModApi(L, top);
lua_pop(L, 1);

LuaMinimap::create(L, client->getMinimap());
if (client->getMinimap())
LuaMinimap::create(L, client->getMinimap());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the minimap is NULL at this time, client side scripting won't be able to access to core.ui.minimap, right?
Please add a note to client_lua_api.md that this table may be nil if the minimap is disabled.

Copy link
Member

@SmallJoker SmallJoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I assume it's tested.

@nerzhul
Copy link
Member Author

nerzhul commented May 18, 2017

yeah i don't do a PR without tests, and here it's simple as we invalidate a pointer, the failure case is a crash when every single action on minimap should be done :p

@nerzhul nerzhul requested a review from Zeno- May 18, 2017 18:33
@nerzhul nerzhul merged commit e25a38e into minetest:master May 19, 2017
@nerzhul nerzhul added this to Done in Minetest 0.4.16 May 20, 2017
@nerzhul nerzhul deleted the real_minimap_disable branch June 6, 2017 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants