diff --git a/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp b/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp index a3f8b1e349..0d3cc7e032 100644 --- a/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp +++ b/Code/Framework/AzCore/Platform/Windows/AzCore/Debug/StackTracer_Windows.cpp @@ -1036,7 +1036,7 @@ cleanup: } HANDLE hThread = nativeThread; - CONTEXT alignas(8) context; // Without this alignment the function randomly crashes in release. + alignas(alignof(CONTEXT)) CONTEXT context; // Without this alignment the function randomly crashes in release. context.ContextFlags = CONTEXT_ALL; GetThreadContext(hThread, &context);