Skip to content

filter-utils: fix indexing nil value

P V requested to merge pvir/wireplumber:flt-null into master

Check target is not nil, which sometimes occurs, before trying to access its .id property.

Fixes lua errors in logs.

W 17:59:40.770120              wplua ../subprojects/wireplumber/modules/module-lua-scripting/wplua/wplua.c:51:_wplua_errhandler: [string "filter-utils.lua"]:473: attempt to index a nil value (local 'target')
stack traceback:
        [string "filter-utils.lua"]:473: in function 'filter-utils.get_filter_from_target'
        [string "get-filter-from-target.lua"]:57: in function <[string "get-filter-from-target.lua"]:22>

Merge request reports