mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-09 02:28:19 +02:00
[script] Reference this if function is called with current object as this
If calling a function which is connected to the current object, the object operated on in the function call is the current object. This is rarely used and somehow survived without causing crashes despite incorrectly not increasing the refcount.
This commit is contained in:
parent
e588785758
commit
417beaca9b
1 changed files with 4 additions and 1 deletions
|
|
@ -324,7 +324,10 @@ static script_obj_t *script_evaluate_func (script_state_t *state,
|
|||
{
|
||||
func_obj = script_obj_hash_peek_element (state->this, name);
|
||||
if (func_obj)
|
||||
this_obj = state->this;
|
||||
{
|
||||
this_obj = state->this;
|
||||
script_obj_ref(this_obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
func_obj = script_obj_hash_peek_element (state->global, name);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue