Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f5196ac authored by Ivan Lozano's avatar Ivan Lozano Committed by android-build-merger
Browse files

Merge "Fix sanitizer in egl_display_t::get." am: 95e19cda

am: 66ecc5ef

Change-Id: Icdd858438f168551260cd0b4b10de1fe5087ec22
parents 6531a6dc 66ecc5ef
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -79,6 +79,10 @@ egl_display_t::~egl_display_t() {
}

egl_display_t* egl_display_t::get(EGLDisplay dpy) {
    if (uintptr_t(dpy) == 0) {
        return nullptr;
    }

    uintptr_t index = uintptr_t(dpy)-1U;
    if (index >= NUM_DISPLAYS || !sDisplay[index].isValid()) {
        return nullptr;