diff --git a/selfdrive/ui/qt/widgets/cameraview.cc b/selfdrive/ui/qt/widgets/cameraview.cc index 6b25c49237..f09b1b1796 100644 --- a/selfdrive/ui/qt/widgets/cameraview.cc +++ b/selfdrive/ui/qt/widgets/cameraview.cc @@ -113,7 +113,7 @@ CameraViewWidget::~CameraViewWidget() { void CameraViewWidget::initializeGL() { initializeOpenGLFunctions(); - program = new QOpenGLShaderProgram(context()); + program = std::make_unique(context()); bool ret = program->addShaderFromSourceCode(QOpenGLShader::Vertex, frame_vertex_shader); assert(ret); ret = program->addShaderFromSourceCode(QOpenGLShader::Fragment, frame_fragment_shader); diff --git a/selfdrive/ui/qt/widgets/cameraview.h b/selfdrive/ui/qt/widgets/cameraview.h index fb69fcae59..146528cd23 100644 --- a/selfdrive/ui/qt/widgets/cameraview.h +++ b/selfdrive/ui/qt/widgets/cameraview.h @@ -40,7 +40,7 @@ protected: GLuint frame_vao, frame_vbo, frame_ibo; mat4 frame_mat; std::unique_ptr texture[UI_BUF_COUNT]; - QOpenGLShaderProgram *program; + std::unique_ptr program; QColor bg = QColor("#000000"); std::string stream_name;