Skip to content

Commit 2c9cf50

Browse files
author
Nako Sung
committed
OutputDevice crashed during post load
1 parent b879338 commit 2c9cf50

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Plugins/UnrealJS/Source/V8/Private/JavascriptOutputDevice.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "V8PCH.h"
22
#include "JavascriptOutputDevice.h"
3+
#include "UObjectThreadContext.h"
34

45
/** This class is to capture all log output even if the log window is closed */
56
class FJavascriptOutputDevice : public FOutputDevice
@@ -32,7 +33,7 @@ class FJavascriptOutputDevice : public FOutputDevice
3233
if (bIsReentrant) return;
3334

3435
TGuardValue<bool> ReentrantGuard(bIsReentrant, true);
35-
if (!OutputDevice->HasAnyFlags(RF_Unreachable))
36+
if (!OutputDevice->HasAnyFlags(RF_Unreachable) && !FUObjectThreadContext::Get().IsRoutingPostLoad)
3637
{
3738
OutputDevice->OnMessage(V, (ELogVerbosity_JS)Verbosity, Category);
3839
}

0 commit comments

Comments
 (0)