1
0
Fork 0

Add WebSocketMultiplayerPeer _incoming_packets check bound

(cherry picked from commit 05ad08941b)
This commit is contained in:
MaxStgs 2021-04-30 18:36:14 +05:00 committed by Rémi Verschelde
parent dacd16fd33
commit a93f52ee7e
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 2 additions and 0 deletions

View File

@ -114,6 +114,8 @@ Error WebSocketMultiplayerPeer::get_packet(const uint8_t **r_buffer, int &r_buff
_current_packet.data = NULL;
}
ERR_FAIL_COND_V(_incoming_packets.size() == 0, ERR_UNAVAILABLE);
_current_packet = _incoming_packets.front()->get();
_incoming_packets.pop_front();