From 21e6e8bc7b76f47ecf1cdbe7bb5eb81d702bb5e3 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Sat, 6 Nov 2021 20:15:01 +0100 Subject: [PATCH] Fix crash when reading from RingBuffer if it's full --- Source/Engine/Core/Collections/RingBuffer.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/Source/Engine/Core/Collections/RingBuffer.h b/Source/Engine/Core/Collections/RingBuffer.h index 8a8deb86f..de5f1224d 100644 --- a/Source/Engine/Core/Collections/RingBuffer.h +++ b/Source/Engine/Core/Collections/RingBuffer.h @@ -69,13 +69,11 @@ public: FORCE_INLINE T& PeekFront() { - ASSERT(_front != _back); return _allocation.Get()[_front]; } FORCE_INLINE const T& PeekFront() const { - ASSERT(_front != _back); return _allocation.Get()[_front]; } @@ -93,7 +91,6 @@ public: void PopFront() { - ASSERT(_front != _back); Memory::DestructItems(_allocation.Get() + _front, 1); _front = (_front + 1) % _capacity; _count--;