From 9a48558429f849d7de8c629aa23cff9daef1f4a9 Mon Sep 17 00:00:00 2001 From: Tristan 'Natrist' Cormier Date: Wed, 8 Oct 2025 16:11:01 -0400 Subject: [PATCH] feat(client): add assertion in ClientServices::Connection (#107) Co-authored-by: fallenoak --- src/client/ClientServices.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/client/ClientServices.cpp b/src/client/ClientServices.cpp index 15590d9..6321a32 100644 --- a/src/client/ClientServices.cpp +++ b/src/client/ClientServices.cpp @@ -155,7 +155,7 @@ void ClientServices::ConnectToSelectedServer() { } ClientConnection* ClientServices::Connection() { - // TODO assertion? + STORM_ASSERT(ClientServices::s_currentConnection); return ClientServices::s_currentConnection; } @@ -390,9 +390,7 @@ void ClientServices::SetCharacterInfo(const CHARACTER_INFO* info) { void ClientServices::SetMessageHandler(NETMESSAGE msgId, MESSAGE_HANDLER handler, void* param) { STORM_ASSERT(handler); - STORM_ASSERT(ClientServices::s_currentConnection); - - ClientServices::s_currentConnection->SetMessageHandler(msgId, handler, param); + ClientServices::Connection()->SetMessageHandler(msgId, handler, param); } int32_t ClientServices::SetSelectedRealmInfo(int32_t a1) {