mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-10-01 03:43:46 +08:00
catch gl_buffer->map() returning nullptr (#23411)
old-commit-hash: 8d80c0107f5d1cd2ba2b5a37f297d3ae8e3b02f3
This commit is contained in:
@@ -291,6 +291,12 @@ void CameraViewWidget::vipcThread() {
|
||||
if (VisionBuf *buf = vipc_client->recv(nullptr, 1000)) {
|
||||
if (!Hardware::EON()) {
|
||||
void *texture_buffer = gl_buffer->map(QOpenGLBuffer::WriteOnly);
|
||||
|
||||
if (texture_buffer == nullptr) {
|
||||
LOGE("gl_buffer->map returned nullptr");
|
||||
continue;
|
||||
}
|
||||
|
||||
memcpy(texture_buffer, buf->addr, buf->len);
|
||||
gl_buffer->unmap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user