Skip to content

Commit 6d8f746

Browse files
authored
fix: two segmentation faults in cluster::guild_edit_member and cluster::tick_timers/cluster::shutdown (#1326)
1 parent 00b848c commit 6d8f746

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/dpp/cluster.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ void cluster::shutdown() {
319319
delete t.second;
320320
}
321321
timer_list.clear();
322+
next_timer.clear();
322323
/* Terminate shards */
323324
for (const auto& sh : shards) {
324325
log(ll_info, "Terminating shard id " + std::to_string(sh.second->shard_id));

src/dpp/cluster/guild_member.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void cluster::guild_add_member(const guild_member& gm, const std::string &access
3030

3131

3232
void cluster::guild_edit_member(const guild_member& gm, command_completion_event_t callback) {
33-
this->post_rest(API_PATH "/guilds", std::to_string(gm.guild_id), "members/" + std::to_string(gm.user_id), m_patch, gm.build_json(), [this, &gm, callback](json &j, const http_request_completion_t& http) {
33+
this->post_rest(API_PATH "/guilds", std::to_string(gm.guild_id), "members/" + std::to_string(gm.user_id), m_patch, gm.build_json(), [this, gm, callback](json &j, const http_request_completion_t& http) {
3434
if (callback) {
3535
callback(confirmation_callback_t(this, guild_member().fill_from_json(&j, gm.guild_id, gm.user_id), http));
3636
}

0 commit comments

Comments
 (0)