diff options
Diffstat (limited to 'protocols/Steam/src/steam_messages.cpp')
-rw-r--r-- | protocols/Steam/src/steam_messages.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/protocols/Steam/src/steam_messages.cpp b/protocols/Steam/src/steam_messages.cpp index 9cd76f3b0f..7e6e07c315 100644 --- a/protocols/Steam/src/steam_messages.cpp +++ b/protocols/Steam/src/steam_messages.cpp @@ -23,16 +23,13 @@ void CSteamProto::OnMessageSent(const NETLIBHTTPREQUEST *response, void *arg) if (response != NULL && response->resultCode == HTTP_STATUS_OK)
{
- JSONNODE *root = json_parse(response->pData), *node;
-
- node = json_get(root, "error");
+ JSONROOT root(response->pData);
+ JSONNODE *node = json_get(root, "error");
ptrA error(mir_utf8encodeW(json_as_string(node)));
if (lstrcmpiA(error, "OK") == 0)
result = true;
else
debugLogA("CSteamProto::OnMessageSent: failed to send message for %s (%s)", steamId, error);
-
- json_delete(root);
}
else
debugLogA("CSteamProto::OnMessageSent: failed to send message for %s", steamId);
|