fix: imaginite on racing minigames and add null checks (#1958)

This commit is contained in:
David Markowitz
2026-02-23 01:16:36 -08:00
committed by GitHub
parent 3c64b26c39
commit 434c9b6315
4 changed files with 8 additions and 6 deletions

View File

@@ -7,6 +7,7 @@
#include "Logger.h"
#include "Loot.h"
#include "ShootingGalleryComponent.h"
#include "RacingControlComponent.h"
bool ActivityManager::IsPlayerInActivity(Entity* self, LWOOBJID playerID) {
const auto* sac = self->GetComponent<ScriptedActivityComponent>();
@@ -99,6 +100,8 @@ bool ActivityManager::TakeActivityCost(const Entity* self, const LWOOBJID player
activityComponent = self->GetComponent<ShootingGalleryComponent>();
}
if (!activityComponent) return false;
auto* player = Game::entityManager->GetEntity(playerID);
if (player == nullptr)
return false;