fix: check application in 7TV event-api (#5768)
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
## Unversioned
|
## Unversioned
|
||||||
|
|
||||||
|
- Bugfix: Fixed a crash in the 7TV EventApi when closing Chatterino. (#5768)
|
||||||
- Bugfix: Fixed scrollbar highlights being visible in overlay windows. (#5769)
|
- Bugfix: Fixed scrollbar highlights being visible in overlay windows. (#5769)
|
||||||
- Bugfix: Make macos fonts look the same as v2.5.1. (#5775)
|
- Bugfix: Make macos fonts look the same as v2.5.1. (#5775)
|
||||||
- Bugfix: Fixed 7TV usernames messing with Qt's HTML (#5780)
|
- Bugfix: Fixed 7TV usernames messing with Qt's HTML (#5780)
|
||||||
|
|||||||
@@ -363,7 +363,13 @@ void SeventvEventAPI::onUserUpdate(const Dispatch &dispatch)
|
|||||||
|
|
||||||
void SeventvEventAPI::onCosmeticCreate(const CosmeticCreateDispatch &cosmetic)
|
void SeventvEventAPI::onCosmeticCreate(const CosmeticCreateDispatch &cosmetic)
|
||||||
{
|
{
|
||||||
auto *badges = getApp()->getSeventvBadges();
|
auto *app = tryGetApp();
|
||||||
|
if (!app)
|
||||||
|
{
|
||||||
|
return; // shutting down
|
||||||
|
}
|
||||||
|
|
||||||
|
auto *badges = app->getSeventvBadges();
|
||||||
switch (cosmetic.kind)
|
switch (cosmetic.kind)
|
||||||
{
|
{
|
||||||
case CosmeticKind::Badge: {
|
case CosmeticKind::Badge: {
|
||||||
@@ -378,7 +384,13 @@ void SeventvEventAPI::onCosmeticCreate(const CosmeticCreateDispatch &cosmetic)
|
|||||||
void SeventvEventAPI::onEntitlementCreate(
|
void SeventvEventAPI::onEntitlementCreate(
|
||||||
const EntitlementCreateDeleteDispatch &entitlement)
|
const EntitlementCreateDeleteDispatch &entitlement)
|
||||||
{
|
{
|
||||||
auto *badges = getApp()->getSeventvBadges();
|
auto *app = tryGetApp();
|
||||||
|
if (!app)
|
||||||
|
{
|
||||||
|
return; // shutting down
|
||||||
|
}
|
||||||
|
|
||||||
|
auto *badges = app->getSeventvBadges();
|
||||||
switch (entitlement.kind)
|
switch (entitlement.kind)
|
||||||
{
|
{
|
||||||
case CosmeticKind::Badge: {
|
case CosmeticKind::Badge: {
|
||||||
@@ -394,7 +406,13 @@ void SeventvEventAPI::onEntitlementCreate(
|
|||||||
void SeventvEventAPI::onEntitlementDelete(
|
void SeventvEventAPI::onEntitlementDelete(
|
||||||
const EntitlementCreateDeleteDispatch &entitlement)
|
const EntitlementCreateDeleteDispatch &entitlement)
|
||||||
{
|
{
|
||||||
auto *badges = getApp()->getSeventvBadges();
|
auto *app = tryGetApp();
|
||||||
|
if (!app)
|
||||||
|
{
|
||||||
|
return; // shutting down
|
||||||
|
}
|
||||||
|
|
||||||
|
auto *badges = app->getSeventvBadges();
|
||||||
switch (entitlement.kind)
|
switch (entitlement.kind)
|
||||||
{
|
{
|
||||||
case CosmeticKind::Badge: {
|
case CosmeticKind::Badge: {
|
||||||
|
|||||||
Reference in New Issue
Block a user