From 472a1cf63b98b398a0862c8d7b4acb59f169adbf Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Thu, 11 May 2023 15:22:09 -0700 Subject: [PATCH] ui: catch silent EGL failure (#28169) Co-authored-by: Comma Device old-commit-hash: 432f316e8df9fd614f784f0b5b3b445d14cc5f8e --- selfdrive/ui/qt/qt_window.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/selfdrive/ui/qt/qt_window.cc b/selfdrive/ui/qt/qt_window.cc index d630b560bb..b83db70671 100644 --- a/selfdrive/ui/qt/qt_window.cc +++ b/selfdrive/ui/qt/qt_window.cc @@ -19,6 +19,10 @@ void setMainWindow(QWidget *w) { wl_surface_set_buffer_transform(s, WL_OUTPUT_TRANSFORM_270); wl_surface_commit(s); w->showFullScreen(); + + // ensure we have a valid eglDisplay, otherwise the ui will silently fail + void *egl = native->nativeResourceForWindow("egldisplay", w->windowHandle()); + assert(egl != nullptr); #endif }