Commit deb5906d authored by nanahira's avatar nanahira

fix

parent 972a11a2
Pipeline #5334 failed with stages
in 62 minutes and 13 seconds
......@@ -3365,7 +3365,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server, datas)->
ygopro.ctos_send(client.server, 'SURRENDER')
else
sur_player = CLIENT_get_partner(client)
if sur_player.closed or sur_player.is_local
if !sur_player or sur_player.closed or sur_player.is_local
sur_player = client
if room.hostinfo.mode==2 and sur_player != client
ygopro.stoc_send_chat(sur_player, "${surrender_confirm_tag}", ygopro.constants.COLORS.BABYBLUE)
......
......@@ -4473,7 +4473,7 @@
ygopro.ctos_send(client.server, 'SURRENDER');
} else {
sur_player = CLIENT_get_partner(client);
if (sur_player.closed || sur_player.is_local) {
if (!sur_player || sur_player.closed || sur_player.is_local) {
sur_player = client;
}
if (room.hostinfo.mode === 2 && sur_player !== client) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment