projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1469424
)
[CSM] Fix crash when the minimap is disabled. Caused by e25a38e
author
SmallJoker
<mk939@ymail.com>
Sat, 20 May 2017 08:12:37 +0000
(10:12 +0200)
committer
SmallJoker
<mk939@ymail.com>
Sat, 20 May 2017 08:26:09 +0000
(10:26 +0200)
clientmods/preview/init.lua
patch
|
blob
|
history
diff --git
a/clientmods/preview/init.lua
b/clientmods/preview/init.lua
index 821f7c7143857954d074b949ced3bea870437142..f3992612a66660c7528d0f3cfa53c8c9b818d7ab 100644
(file)
--- a/
clientmods/preview/init.lua
+++ b/
clientmods/preview/init.lua
@@
-78,6
+78,10
@@
core.register_chatcommand("test_node", {
local function preview_minimap()
local minimap = core.ui.minimap
+ if not minimap then
+ print("[PREVIEW] Minimap is disabled. Skipping.")
+ return
+ end
minimap:set_mode(4)
minimap:show()
minimap:set_pos({x=5, y=50, z=5})
@@
-96,7
+100,9
@@
core.after(2, function()
end)
core.after(5, function()
- core.ui.minimap:show()
+ if core.ui.minimap then
+ core.ui.minimap:show()
+ end
print("[PREVIEW] Day count: " .. core.get_day_count() ..
" time of day " .. core.get_timeofday())