forked from your-land-mirror/yl_speak_up
fix crash when deleting non-existant trade
This commit is contained in:
parent
24106d984b
commit
6588ef4cdb
@ -387,6 +387,9 @@ yl_speak_up.input_add_trade_simple = function(player, formname, fields)
|
||||
table.insert(yl_speak_up.npc_was_changed[ n_id ],
|
||||
"Dialog "..d_id..": Trade "..tostring(trade_id).." deleted from option "..
|
||||
tostring(o_id)..".")
|
||||
if(not(dialog.trades)) then
|
||||
dialog.trades = {}
|
||||
end
|
||||
-- delete the trade type result
|
||||
if(trade_id) then
|
||||
dialog.trades[ trade_id ] = nil
|
||||
|
Loading…
Reference in New Issue
Block a user