diff options
Diffstat (limited to 'src/net/connection.cpp')
-rw-r--r-- | src/net/connection.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net/connection.cpp b/src/net/connection.cpp index 4ce05d4a..ce060ae7 100644 --- a/src/net/connection.cpp +++ b/src/net/connection.cpp @@ -84,7 +84,8 @@ void Net::Connection::disconnect() bool Net::Connection::isConnected() { - return mConnection && mConnection->state == ENET_PEER_STATE_CONNECTED; + return bool (mConnection) ? + (mConnection->state == ENET_PEER_STATE_CONNECTED) : false; } void Net::Connection::send(const MessageOut &msg) |