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

Commit 48e14701 authored by Kyong Hwa Bae's avatar Kyong Hwa Bae Committed by Giulio Cervera
Browse files

SurfaceFlinger: Fix surfaceflinger crash when showing screen update

With selecting 'show screen update' option under Setting/Developer
options, there's crash in getYUVBufferCount() in Hwcomposer.cpp.
This occurs because the handles of hwc_layer_list have invalid
values that are passed from HWComposer:createWorkList().
Initialized hwc_layer_list after it is allocated.
parent 0ac32310
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -93,6 +93,7 @@ status_t HWComposer::createWorkList(size_t numLayers) {
            free(mList);
            size_t size = sizeof(hwc_layer_list) + numLayers*sizeof(hwc_layer_t);
            mList = (hwc_layer_list_t*)malloc(size);
            memset(mList, 0, size);
            mCapacity = numLayers;
        }
        mList->flags = HWC_GEOMETRY_CHANGED;