WFL: Prevent a crash if an object is destroyed before the formula is finished with it
This commit is contained in:
parent
c6486bd7cc
commit
7756242160
1 changed files with 3 additions and 1 deletions
|
@ -279,7 +279,9 @@ std::size_t variant::num_elements() const
|
|||
variant variant::get_member(const std::string& name) const
|
||||
{
|
||||
if(is_callable()) {
|
||||
return value_cast<variant_callable>()->get_callable()->query_value(name);
|
||||
if(auto obj = value_cast<variant_callable>()->get_callable()) {
|
||||
return obj->query_value(name);
|
||||
}
|
||||
}
|
||||
|
||||
if(name == "self") {
|
||||
|
|
Loading…
Add table
Reference in a new issue