Fixed crash and build type

This commit is contained in:
WolverinDEV 2020-11-10 17:02:31 +01:00
parent e925c80991
commit dd4a3f65a4
2 changed files with 4 additions and 3 deletions

View File

@ -8,7 +8,7 @@ namespace build {
enum BuildType {
STABLE,
BETA,
ALPHA,
NIGHTLY,
PRIVATE
};

View File

@ -594,11 +594,12 @@ void ServerChannelTree::on_channel_entry_deleted(const shared_ptr<BasicChannel>
std::shared_ptr<BasicChannel> ServerChannelTree::allocateChannel(const shared_ptr<BasicChannel> &parent, ChannelId channelId) {
auto server = this->server_ref.lock();
auto parent_channel_id = parent ? parent->channelId() : 0;
if(server) {
auto rtc_channel_id = server->rtc_server().create_channel();
return std::make_shared<ServerChannel>(rtc_channel_id, parent->channelId(), channelId);
return std::make_shared<ServerChannel>(rtc_channel_id, parent_channel_id, channelId);
} else {
return std::make_shared<ServerChannel>(0, parent->channelId(), channelId);
return std::make_shared<ServerChannel>(0, parent_channel_id, channelId);
}
}