summaryrefslogtreecommitdiff
path: root/src/lua/include/property.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/include/property.hpp')
-rw-r--r--src/lua/include/property.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua/include/property.hpp b/src/lua/include/property.hpp
index 425cc15c..03229bc1 100644
--- a/src/lua/include/property.hpp
+++ b/src/lua/include/property.hpp
@@ -35,7 +35,7 @@ class Property {
Property(const LuaValue&);
Property(const LuaValue&, std::function<bool(const LuaValue&)>);
- auto Get() -> const LuaValue& { return value_; }
+ auto Get() -> const LuaValue& { return *value_; }
auto IsTwoWay() -> bool { return cb_.has_value(); }
@@ -46,7 +46,7 @@ class Property {
auto AddLuaBinding(lua_State*, int ref) -> void;
private:
- LuaValue value_;
+ std::unique_ptr<LuaValue> value_;
std::optional<std::function<bool(const LuaValue&)>> cb_;
std::pmr::vector<std::pair<lua_State*, int>> bindings_;
};