Fixed a crash

This commit is contained in:
WolverinDEV
2020-01-27 13:02:22 +01:00
parent aaea9b9339
commit 8acd2396d3
8 changed files with 53 additions and 15 deletions
+6 -3
View File
@@ -171,10 +171,13 @@ std::deque<std::shared_ptr<ViewEntry>> ClientChannelView::insert_channels(shared
head = head->next;
continue;
};
debugMessage(this->getServerId(), "{}[CHANNELS] Insert channel {} ({} => order {}) after {} ({})",
auto now_prv = this->find_channel(entry->previousChannelId());
debugMessage(this->getServerId(), "{}[CHANNELS] Insert channel {} ({}) after {} ({}). Original view prv: {} ({}). Original prv: {} ({})",
CLIENT_STR_LOG_PREFIX_(this->owner),
channel->channelId(), channel->name(), entry->previousChannelId(),
previous ? previous->channelId() : 0, previous_channel ? previous_channel->name() : ""
channel->channelId(), channel->name(),
entry->previousChannelId(), now_prv ? now_prv->channel()->name() : "",
remote_previous ? remote_previous->entry->channelId() : 0, remote_previous ? dynamic_pointer_cast<BasicChannel>(remote_previous->entry)->name() : "",
head->previous ? head->previous->entry->channelId() : 0, head->previous ? dynamic_pointer_cast<BasicChannel>(head->previous->entry)->name() : ""
);
result.push_back(entry);