diff --git a/libhwcomposer/hwcomposer.cpp b/libhwcomposer/hwcomposer.cpp index 6250218..0fe1450 100644 --- a/libhwcomposer/hwcomposer.cpp +++ b/libhwcomposer/hwcomposer.cpp @@ -1670,8 +1670,8 @@ static int hwc_set(hwc_composer_device_t *dev, } } } else { - ctx->hwcOverlayStatus = HWC_OVERLAY_PREPARE_TO_CLOSE; - unlockPreviousOverlayBuffer(ctx); + if (ctx->hwcOverlayStatus == HWC_OVERLAY_OPEN) + ctx->hwcOverlayStatus = HWC_OVERLAY_PREPARE_TO_CLOSE; }