Skip to content

Commit

Permalink
Fix crash when first connecting to a brand new account
Browse files Browse the repository at this point in the history
  • Loading branch information
EionRobb committed Aug 14, 2024
1 parent 7091a0e commit aeb36b5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libdiscord.c
Original file line number Diff line number Diff line change
Expand Up @@ -6667,11 +6667,15 @@ discord_start_socket(DiscordAccount *da)
#ifdef USE_QRCODE_AUTH
if (da->running_auth_qrcode) {
da->websocket = purple_ssl_connect(da->account, DISCORD_QRCODE_AUTH_SERVER, DISCORD_QRCODE_AUTH_SERVER_PORT, discord_socket_connected, discord_socket_failed, da);
} else
} else {
#endif

server = da->gateway_url ? da->gateway_url : DISCORD_GATEWAY_SERVER;
da->websocket = purple_ssl_connect(da->account, server, DISCORD_GATEWAY_PORT, discord_socket_connected, discord_socket_failed, da);

#ifdef USE_QRCODE_AUTH
}
#endif
}

static gboolean
Expand Down

0 comments on commit aeb36b5

Please sign in to comment.