Fixed crash and build type
This commit is contained in:
parent
e925c80991
commit
dd4a3f65a4
@ -8,7 +8,7 @@ namespace build {
|
||||
enum BuildType {
|
||||
STABLE,
|
||||
BETA,
|
||||
ALPHA,
|
||||
NIGHTLY,
|
||||
PRIVATE
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user