Add empty check
This commit is contained in:
parent
fb5659fbc6
commit
4f25c2ab36
|
@ -176,6 +176,8 @@ int ENetPacketPeer::get_channels() const {
|
|||
}
|
||||
|
||||
int ENetPacketPeer::get_packet_flags() const {
|
||||
ERR_FAIL_NULL_V(peer, ERR_UNCONFIGURED);
|
||||
ERR_FAIL_COND_V(packet_queue.is_empty(), ERR_UNAVAILABLE);
|
||||
return packet_queue.front()->get()->flags;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue