From cecefa2d97c953e9a3cd6094f2dcc43fcef491fe Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 10 Feb 2019 13:26:46 +1000 Subject: [PATCH] ChunkFile: Don't access element zero of empty container This was causing assertion failures in debug MSVC builds. --- Source/Core/Common/ChunkFile.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/Common/ChunkFile.h b/Source/Core/Common/ChunkFile.h index b4383d2570..aef3a2ec4a 100644 --- a/Source/Core/Common/ChunkFile.h +++ b/Source/Core/Common/ChunkFile.h @@ -262,7 +262,8 @@ private: Do(size); container.resize(size); - DoArray(&container[0], size); + if (size > 0) + DoArray(&container[0], size); } template