From ff495e1319348a0dcc7217dfe77288e5bec586aa Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Fri, 11 Oct 2024 20:15:17 +0200 Subject: [PATCH] Add safety check to exit game in Release mode when running with graphics debugger attached --- Source/Engine/Graphics/Graphics.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Engine/Graphics/Graphics.cpp b/Source/Engine/Graphics/Graphics.cpp index a1640c0b4..886728d95 100644 --- a/Source/Engine/Graphics/Graphics.cpp +++ b/Source/Engine/Graphics/Graphics.cpp @@ -200,6 +200,10 @@ bool GraphicsService::Init() #endif ) { +#if !USE_EDITOR && BUILD_RELEASE + // Block graphics debugging to protect contents + Platform::Fatal(TEXT("Graphics debugger attached.")); +#endif #if COMPILE_WITH_PROFILER // Auto-enable GPU events ProfilerGPU::EventsEnabled = true;