summaryrefslogtreecommitdiff
path: root/libs/gui/BufferQueueThreadState.cpp
diff options
context:
space:
mode:
author Leon Scroggins III <scroggo@google.com> 2022-08-03 15:35:40 -0400
committer Leon Scroggins III <scroggo@google.com> 2022-08-30 17:39:31 -0400
commit0f365abe4ffd82599b186e8ccd91e96fc943351c (patch)
tree6d4a1caa0ae9acd40d294a1364db34668353f276 /libs/gui/BufferQueueThreadState.cpp
parentb50bc9cd1dec3e4dd679aed44582b8d24628e985 (diff)
Remove undefined behavior in getDisplayDecorationSupport
I3b46bae068ac3d482881dac96972a40e46581d34 introduced a bug when converting between two different versions of DisplayDecorationSupport. We attempt to set the member fields of an std::optional object before it has a value. Use emplace to insert a value into the object. Unfortunately, fixing this reveals b/241278870, which is a serious regression. On the other hand, the current checked in code results in undefined behavior, so prevent that. Once b/241278870 is fixed, it will be simple to remove the check for 'false'. Bug: 241277093 Test: manual Change-Id: I53a56b792d99bb72d49d32b5d8f071353dae1b41
Diffstat (limited to 'libs/gui/BufferQueueThreadState.cpp')
0 files changed, 0 insertions, 0 deletions