do not crash in case of error

This commit is contained in:
Sokomine 2021-05-04 20:13:12 +02:00
parent d1ba5f1ce5
commit 73d16ae76a

View File

@ -1145,6 +1145,11 @@ local function get_fs_talkdialog(player, n_id, d_id)
-- Now we have a dialog to display to the user
-- do not crash in case of error
if(not(active_dialog)) then
minetest.chat_send_player(pname, "Ups! Something went wrong. Please try again.")
return
end
local allowed = calculate_displayable_options(pname, active_dialog.d_options)
yl_speak_up.speak_to[pname].allowed = allowed