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

Skip to content
Commit 0f365abe authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

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
parent b50bc9cd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment