diff options
author | Sergio Martins <sergio.martins@kdab.com> | 2017-08-25 12:12:19 +0100 |
---|---|---|
committer | Sérgio Martins <sergio.martins@kdab.com> | 2017-08-25 11:58:34 +0000 |
commit | d34bc92a44240153a61438de2e30fa6f946e6a4c (patch) | |
tree | fb837b568849cba4494a574725914c3c80e39f6d | |
parent | ff08f80aca53eafecb6ad89c60f5b3b7fdca1c07 (diff) |
Don't dereference null vao
RPI doesn't support vao
Change-Id: Icfcf90c6aff53a73704cc36c215b7b452be86778
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
-rw-r--r-- | src/render/backend/openglvertexarrayobject.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/render/backend/openglvertexarrayobject.cpp b/src/render/backend/openglvertexarrayobject.cpp index eefc208d5..c0fdd8e65 100644 --- a/src/render/backend/openglvertexarrayobject.cpp +++ b/src/render/backend/openglvertexarrayobject.cpp @@ -101,8 +101,10 @@ void OpenGLVertexArrayObject::create(GraphicsContext *ctx, const VAOIdentifier & m_ctx = ctx; m_supportsVao = m_ctx->supportsVAO(); - m_vao.reset(m_supportsVao ? new QOpenGLVertexArrayObject() : nullptr); - m_vao->create(); + if (m_supportsVao) { + m_vao.reset(new QOpenGLVertexArrayObject()); + m_vao->create(); + } m_owners = key; } |