aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2016-12-12 13:44:49 +0100
committerUlf Hermann <ulf.hermann@qt.io>2016-12-20 11:27:48 +0000
commit054dbb0bee0a9cc2a9cb2d36bca72dedd9f08a3e (patch)
tree2647d3f39870cf6e6c87a9ad31781f11aa049926 /src/quick
parent0577aa9fd2808d24631ae03a9e3cbe6326be20e6 (diff)
Q_CHECK_PTR the result of malloc() in batch renderer
We want to cleanly crash if it fails. Change-Id: Ib32d3d6ae0c5d58e0a954e55adca8b2c4081a7f5 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp1
1 files changed, 1 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;
}