Fix trash restore crash
No message selected, makes an attempt to index nil value
This commit is contained in:
parent
bfd3692280
commit
968f402566
@ -241,7 +241,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
mail.show_mail_menu(name, sortfieldindex, sortdirection, filter)
|
||||
|
||||
elseif fields.restore then
|
||||
mail.restore_mail(name, messagesTrash[mail.selected_idxs.trash[name]].id)
|
||||
if messagesTrash[mail.selected_idxs.trash[name]] then
|
||||
mail.restore_mail(name, messagesTrash[mail.selected_idxs.trash[name]].id)
|
||||
end
|
||||
mail.show_mail_menu(name, sortfieldindex, sortdirection, filter)
|
||||
|
||||
elseif fields.reply then
|
||||
|
Loading…
Reference in New Issue
Block a user