Skip to content

Commit

Permalink
fixed a potentional bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fourtf committed Aug 27, 2020
1 parent 63c167f commit 279a80b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,10 @@ void Application::initPubsub()
auto reward = ChannelPointReward(data);

postToThread([chan, reward] {
auto channel = dynamic_cast<TwitchChannel *>(chan.get());
channel->addChannelPointReward(reward);
if (auto channel = dynamic_cast<TwitchChannel *>(chan.get()))
{
channel->addChannelPointReward(reward);
}
});
}
else
Expand Down

0 comments on commit 279a80b

Please sign in to comment.