diff options
| author | George Hazan <george.hazan@gmail.com> | 2025-04-02 13:51:11 +0300 |
|---|---|---|
| committer | George Hazan <george.hazan@gmail.com> | 2025-04-02 13:51:11 +0300 |
| commit | 86cb2d6947b6c352313628500d40055145c4b128 (patch) | |
| tree | b2cc56398291d3b952504256e22c7842ff805d88 | |
| parent | 7be211a5dee815dce45b13500d9b1b27d770f681 (diff) | |
fixes #4939 (Steam protocol crash when left waiting on 2FA prompt)
| -rw-r--r-- | protocols/Steam/src/steam_ws.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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) |
