diff --git a/Source/the_twilight_abyss/TurnBasedCombatV2/StatusEffect.cpp b/Source/the_twilight_abyss/TurnBasedCombatV2/StatusEffect.cpp index 931ac87..b11966f 100644 --- a/Source/the_twilight_abyss/TurnBasedCombatV2/StatusEffect.cpp +++ b/Source/the_twilight_abyss/TurnBasedCombatV2/StatusEffect.cpp @@ -45,6 +45,7 @@ void UStatusEffect::OnStatusEffectAdd(AActor* Character) void UStatusEffect::TickDown(AActor* Character) { UStatusSystem* StatusSystem = Cast(Character->GetComponentByClass(UStatusSystem::StaticClass())); + if (!IsValid(StatusSystem->GetActiveStatusEffect(this).StatusIcon)) return; UTextBlock* StatusText = Cast(StatusSystem->GetActiveStatusEffect(this).StatusIcon->GetWidgetFromName(TEXT("DurationText"))); StatusText->SetText(FText::FromString(FString::FromInt(BaseDuration))); }