diff --git a/src/mbgl/gl/upload_pass.cpp b/src/mbgl/gl/upload_pass.cpp index 8243675ff74..324d196098e 100644 --- a/src/mbgl/gl/upload_pass.cpp +++ b/src/mbgl/gl/upload_pass.cpp @@ -271,7 +271,9 @@ gfx::AttributeBindingArray UploadPass::buildAttributeBindings( return; } - overrideAttr->setDirty(false); + if (overrideAttr) { + overrideAttr->setDirty(false); + } bindings[index] = { /*.attribute = */ {defaultAttr.getDataType(), offset}, diff --git a/src/mbgl/gl/vertex_attribute_gl.cpp b/src/mbgl/gl/vertex_attribute_gl.cpp index abd8740fd2e..4ffc2aa9c13 100644 --- a/src/mbgl/gl/vertex_attribute_gl.cpp +++ b/src/mbgl/gl/vertex_attribute_gl.cpp @@ -169,7 +169,7 @@ const std::vector& VertexAttributeGL::getRaw(gfx::VertexAttribute& for (std::size_t i = 0; i < count; ++i) { if (!get(attr.get(i), type, outPtr)) { // missing type conversion - assert(false); + std::fill(outPtr, outPtr + stride_, 0); } outPtr += stride_; }