diff --git a/Source/StudyFrameworkPlugin/Private/SFGameInstance.cpp b/Source/StudyFrameworkPlugin/Private/SFGameInstance.cpp index 4670399b84334b90ab16013b65a4141ea8634af8..b44599d4092a4e671a66f36088c72e3faf0880da 100644 --- a/Source/StudyFrameworkPlugin/Private/SFGameInstance.cpp +++ b/Source/StudyFrameworkPlugin/Private/SFGameInstance.cpp @@ -818,8 +818,12 @@ USFLogObject* USFGameInstance::GetLogObject() void USFGameInstance::LogComment(const FString& Comment, bool bAlsoLogToHUD /*= true*/) { - UniLog.Log("#" + GetParticipant()->GetCurrentTimeAsString() + ": " + Comment, "ParticipantLog"); FSFLoggingUtils::Log("Logged Comment: " + Comment); + if (!GetParticipant()) + { + return; + } + UniLog.Log("#" + GetParticipant()->GetCurrentTimeAsString() + ": " + Comment, "ParticipantLog"); if (bAlsoLogToHUD) { LogToHUD(Comment);