ui: catch silent EGL failure (#28169)

Co-authored-by: Comma Device <device@comma.ai>
pull/28174/head
Adeeb Shihadeh 2 years ago committed by GitHub
parent 40dd150fc6
commit 432f316e8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      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_set_buffer_transform(s, WL_OUTPUT_TRANSFORM_270);
wl_surface_commit(s); wl_surface_commit(s);
w->showFullScreen(); 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 #endif
} }

Loading…
Cancel
Save