diff --git a/functions.lua b/functions.lua index ae8356f..ee4f736 100644 --- a/functions.lua +++ b/functions.lua @@ -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