Skip to content

Commit 2688fa3

Browse files
in case of failure to initialise discord_client, null the ptr
1 parent 1f14482 commit 2688fa3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/dpp/cluster.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ void cluster::start(start_type return_after) {
249249
shards[shard_id] = new discord_client(*old, seq_no, session_id);
250250
} else {
251251
log(ll_trace, "Attempting full reconnection...");
252+
shards[shard_id] = nullptr;
252253
shards[shard_id] = new discord_client(this, shard_id, numshards, token, intents, compressed, ws_mode);
253254
}
254255
/* Delete the old one */

0 commit comments

Comments
 (0)