fix: assert for GUI thread in getters instead of get(I)App (#5102)
This commit is contained in:
+15
-4
@@ -305,26 +305,35 @@ int Application::run(QApplication &qtApp)
|
||||
|
||||
IEmotes *Application::getEmotes()
|
||||
{
|
||||
assertInGuiThread();
|
||||
|
||||
return this->emotes;
|
||||
}
|
||||
|
||||
IUserDataController *Application::getUserData()
|
||||
{
|
||||
assertInGuiThread();
|
||||
|
||||
return this->userData;
|
||||
}
|
||||
|
||||
ISoundController *Application::getSound()
|
||||
{
|
||||
assertInGuiThread();
|
||||
|
||||
return this->sound;
|
||||
}
|
||||
|
||||
ITwitchLiveController *Application::getTwitchLiveController()
|
||||
{
|
||||
assertInGuiThread();
|
||||
|
||||
return this->twitchLiveController;
|
||||
}
|
||||
|
||||
TwitchBadges *Application::getTwitchBadges()
|
||||
{
|
||||
assertInGuiThread();
|
||||
assert(this->twitchBadges);
|
||||
|
||||
return this->twitchBadges.get();
|
||||
@@ -332,16 +341,22 @@ TwitchBadges *Application::getTwitchBadges()
|
||||
|
||||
ITwitchIrcServer *Application::getTwitch()
|
||||
{
|
||||
assertInGuiThread();
|
||||
|
||||
return this->twitch;
|
||||
}
|
||||
|
||||
PubSub *Application::getTwitchPubSub()
|
||||
{
|
||||
assertInGuiThread();
|
||||
|
||||
return this->twitchPubSub.get();
|
||||
}
|
||||
|
||||
Logging *Application::getChatLogger()
|
||||
{
|
||||
assertInGuiThread();
|
||||
|
||||
return this->logging.get();
|
||||
}
|
||||
|
||||
@@ -884,8 +899,6 @@ Application *getApp()
|
||||
{
|
||||
assert(Application::instance != nullptr);
|
||||
|
||||
assertInGuiThread();
|
||||
|
||||
return Application::instance;
|
||||
}
|
||||
|
||||
@@ -893,8 +906,6 @@ IApplication *getIApp()
|
||||
{
|
||||
assert(IApplication::instance != nullptr);
|
||||
|
||||
assertInGuiThread();
|
||||
|
||||
return IApplication::instance;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user