Merge "libgui: layer_state_t::read() check null" into rvc-dev-plus-aosp am: 4c924bab94

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/12184116

Change-Id: Iabef4c2598b00645242ffe54adb8989e007215ab