Skip to content

Commit

Permalink
Fix crash when pressing a key while game loading
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberMor committed May 16, 2023
1 parent 11296f7 commit 5d059e3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions client/network.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ struct Network {

bool SendPacket(const adr_t data, const uint_t size) noexcept
{
assert(_rakclientinterface != nullptr);
return _rakclientinterface->Send(&BitStream(data, size, false),
return _rakclientinterface != nullptr && _rakclientinterface->Send(&BitStream(data, size, false),
PacketPriority::MEDIUM_PRIORITY, PacketReliability::RELIABLE_ORDERED, 0);
}

Expand Down

0 comments on commit 5d059e3

Please sign in to comment.