diff --git a/Source/UniversalLogging/Private/UniversalLogging.cpp b/Source/UniversalLogging/Private/UniversalLogging.cpp index 142e73b90bea2df1fa949e51eb11df375dd281f8..79623e3b9e727f9fe0d3f3fbe3e01feee7705de5 100644 --- a/Source/UniversalLogging/Private/UniversalLogging.cpp +++ b/Source/UniversalLogging/Private/UniversalLogging.cpp @@ -63,7 +63,8 @@ void UniversalLoggingImpl::OnPostActorTick(UWorld* World, ELevelTick LevelTick, if (!PlayerController) return; auto HUD = PlayerController->GetHUD(); - HUD->AddPostRenderedActor(On_Screen_Log_Actor); // Doing this every tick seems excessive (AddPostRenderActor checks for duplicates, though) + if (HUD) + HUD->AddPostRenderedActor(On_Screen_Log_Actor); // Doing this every tick seems excessive (AddPostRenderActor checks for duplicates, though) HUD->bShowOverlays = true; // Yuck, but necessary as otherwise the Actor's PostRenderFor method is not called. }