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

Commit 1a3bf41b authored by Erik Gilling's avatar Erik Gilling
Browse files

Fix SurfaceFlinger crash in HWC::eventControl

eventControl was not checking if there was a hwc before callingi
hwc->eventControl

Change-Id: I4d739fc9c0d47da131f4ffc5d50e274de156d012
parent a344c2bb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ void HWComposer::vsync(int dpy, int64_t timestamp) {

status_t HWComposer::eventControl(int event, int enabled) {
    status_t err = NO_ERROR;
    if (mHwc->common.version >= HWC_DEVICE_API_VERSION_0_3) {
    if (mHwc && mHwc->common.version >= HWC_DEVICE_API_VERSION_0_3) {
        err = mHwc->methods->eventControl(mHwc, event, enabled);
    } else {
        if (mVSyncThread != NULL) {