diff options
author | Liang Qi <liang.qi@qt.io> | 2016-12-25 18:28:32 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-12-25 18:35:38 +0100 |
commit | 9a272ad1854d744ea57296ba633b9d0dc19d1625 (patch) | |
tree | 096752ec339e18998517a4598f907e4b42b9403d /src/quick/scenegraph | |
parent | 70c6b9639c53d2a530ccabd1395f561211c16fa4 (diff) | |
parent | d8a052bc6b0349045db3d43a373b09cb16b41a48 (diff) |
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
tools/qmlimportscanner/main.cpp
Change-Id: I01e17581f6691a03f83788773364d0cf96319514
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | 1 | ||||
-rw-r--r-- | src/quick/scenegraph/coreapi/qsggeometry.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp index 6771c0e940..6db96f369c 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp @@ -898,6 +898,7 @@ void Renderer::map(Buffer *buffer, int byteSize, bool isIndexBuf) } else if (buffer->size != byteSize) { free(buffer->data); buffer->data = (char *) malloc(byteSize); + Q_CHECK_PTR(buffer->data); } buffer->size = byteSize; } diff --git a/src/quick/scenegraph/coreapi/qsggeometry.cpp b/src/quick/scenegraph/coreapi/qsggeometry.cpp index a278c6079b..69a8c21ed2 100644 --- a/src/quick/scenegraph/coreapi/qsggeometry.cpp +++ b/src/quick/scenegraph/coreapi/qsggeometry.cpp @@ -675,6 +675,7 @@ void QSGGeometry::allocate(int vertexCount, int indexCount) Q_ASSERT(m_index_type == UnsignedIntType || m_index_type == UnsignedShortType); int indexByteSize = indexCount * (m_index_type == UnsignedShortType ? sizeof(quint16) : sizeof(quint32)); m_data = (void *) malloc(vertexByteSize + indexByteSize); + Q_CHECK_PTR(m_data); m_index_data_offset = vertexByteSize; m_owns_data = true; } |