diff --git a/selfdrive/ui/qt/offroad/driverview.cc b/selfdrive/ui/qt/offroad/driverview.cc index 8d738d4fabca2b..56aef09a8ff5ea 100644 --- a/selfdrive/ui/qt/offroad/driverview.cc +++ b/selfdrive/ui/qt/offroad/driverview.cc @@ -70,8 +70,8 @@ DriverViewDialog::DriverViewDialog(QWidget *parent) : DialogBase(parent) { QVBoxLayout *main_layout = new QVBoxLayout(this); main_layout->setContentsMargins(0, 0, 0, 0); DriverViewWindow camera(this); - main_layout->addWidget(camera); - QObject::connect(camera, &DriverViewWindow::clicked, this, &DialogBase::accept); + main_layout->addWidget(&camera); + QObject::connect(&camera, &DriverViewWindow::clicked, this, &DialogBase::accept); QObject::connect(device(), &Device::interactiveTimeout, this, &DialogBase::accept); }