mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 798812 - crashes after I open a customer report and select…
Edit/Report Options As a result of auto instead of auto& in a std::visit call which resulted in a temporary option whose GncOwner* was destroyed before we could use it.
This commit is contained in:
parent
96c8cb738c
commit
f4f481fe38
@ -47,7 +47,7 @@ template <typename ValueType> ValueType
|
||||
GncOption::get_value() const
|
||||
{
|
||||
return std::visit(
|
||||
[](const auto option)->ValueType {
|
||||
[](const auto& option)->ValueType {
|
||||
if constexpr (is_same_decayed_v<decltype(option.get_value()),
|
||||
ValueType>)
|
||||
return option.get_value();
|
||||
@ -80,7 +80,7 @@ template <typename ValueType> ValueType
|
||||
GncOption::get_default_value() const
|
||||
{
|
||||
return std::visit(
|
||||
[](const auto option)->ValueType {
|
||||
[](const auto& option)->ValueType {
|
||||
if constexpr (is_same_decayed_v<decltype(option.get_value()),
|
||||
ValueType>)
|
||||
return option.get_default_value();
|
||||
|
Loading…
Reference in New Issue
Block a user