From 86cb2d6947b6c352313628500d40055145c4b128 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 2 Apr 2025 13:51:11 +0300 Subject: fixes #4939 (Steam protocol crash when left waiting on 2FA prompt) --- protocols/Steam/src/steam_ws.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'protocols') diff --git a/protocols/Steam/src/steam_ws.cpp b/protocols/Steam/src/steam_ws.cpp index 85c4ee5f33..b42c217172 100644 --- a/protocols/Steam/src/steam_ws.cpp +++ b/protocols/Steam/src/steam_ws.cpp @@ -254,7 +254,8 @@ void CSteamProto::WSSendRaw(EMsg msgType, const MBinBuffer &body) << uint8_t(239) << m_iSteamId << m_iSessionId; payload.append(body); - m_ws->sendBinary(payload.data(), payload.length()); + if (m_ws) + m_ws->sendBinary(payload.data(), payload.length()); } void CSteamProto::WSSendHeader(EMsg msgType, const CMsgProtoBufHeader &hdr, const ProtobufCppMessage &msg) @@ -274,7 +275,8 @@ void CSteamProto::WSSendHeader(EMsg msgType, const CMsgProtoBufHeader &hdr, cons protobuf_c_message_pack(&msg, body.data()); hdrbuf.append(body); - m_ws->sendBinary(hdrbuf.data(), hdrbuf.length()); + if (m_ws) + m_ws->sendBinary(hdrbuf.data(), hdrbuf.length()); } void CSteamProto::WSSendAnon(const char *pszServiceName, const ProtobufCppMessage &msg) -- cgit v1.2.3