From a55412fcf625bc9d27e695ea06dcf173c4b9465e Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Wed, 24 Jul 2019 23:25:48 +0200 Subject: [PATCH] - fix crash when rendering models --- src/rendering/polyrenderer/backend/poly_buffers.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rendering/polyrenderer/backend/poly_buffers.cpp b/src/rendering/polyrenderer/backend/poly_buffers.cpp index d99056b9c..392684532 100644 --- a/src/rendering/polyrenderer/backend/poly_buffers.cpp +++ b/src/rendering/polyrenderer/backend/poly_buffers.cpp @@ -65,6 +65,8 @@ void PolyBuffer::Unmap() void *PolyBuffer::Lock(unsigned int size) { + if (mData.size() < (size_t)size) + Resize(size); return map; }