mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
accidentally added a line
This commit is contained in:
parent
4aec66e3ea
commit
5ae671dc14
1 changed files with 12 additions and 16 deletions
|
@ -194,25 +194,21 @@ void TwitchServer::forEachChannelAndSpecialChannels(std::function<void(ChannelPt
|
||||||
|
|
||||||
std::shared_ptr<Channel> TwitchServer::getChannelOrEmptyByID(const QString &channelID)
|
std::shared_ptr<Channel> TwitchServer::getChannelOrEmptyByID(const QString &channelID)
|
||||||
{
|
{
|
||||||
this->forEachChannel();
|
std::lock_guard<std::mutex> lock(this->channelMutex);
|
||||||
|
|
||||||
{
|
for (const auto &weakChannel : this->channels) {
|
||||||
std::lock_guard<std::mutex> lock(this->channelMutex);
|
auto channel = weakChannel.lock();
|
||||||
|
if (!channel) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
for (const auto &weakChannel : this->channels) {
|
auto twitchChannel = std::dynamic_pointer_cast<TwitchChannel>(channel);
|
||||||
auto channel = weakChannel.lock();
|
if (!twitchChannel) {
|
||||||
if (!channel) {
|
continue;
|
||||||
continue;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
auto twitchChannel = std::dynamic_pointer_cast<TwitchChannel>(channel);
|
if (twitchChannel->roomID == channelID) {
|
||||||
if (!twitchChannel) {
|
return twitchChannel;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (twitchChannel->roomID == channelID) {
|
|
||||||
return twitchChannel;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue