monitor-utils: make cam_api_data a local variable
Otherwise it is global and it retains a reference to the `parent` WpSpaDevice object until this function is called again, which prevents some camera nodes - in some cases - from being destroyed Fixes #640
This commit is contained in:
@@ -161,7 +161,7 @@ function mutils.register_cam_node (self, parent, id, factory, properties)
|
|||||||
cam_data.dev_path = properties["api.v4l2.path"]
|
cam_data.dev_path = properties["api.v4l2.path"]
|
||||||
end
|
end
|
||||||
|
|
||||||
cam_api_data = cam_data[api]
|
local cam_api_data = cam_data[api]
|
||||||
cam_api_data.enum_status = true
|
cam_api_data.enum_status = true
|
||||||
|
|
||||||
-- cache info, it comes handy when creating node
|
-- cache info, it comes handy when creating node
|
||||||
|
Reference in New Issue
Block a user