From c4c5ca8e2215e5fc295b39af4504c43ed3fe176f Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Mon, 14 Feb 2022 10:38:51 +0200 Subject: [PATCH] policy-bluetooth: fix string.find crash with nil string Fixes #193 --- src/scripts/policy-bluetooth.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/policy-bluetooth.lua b/src/scripts/policy-bluetooth.lua index 24fbffbb..f8f69a14 100644 --- a/src/scripts/policy-bluetooth.lua +++ b/src/scripts/policy-bluetooth.lua @@ -118,7 +118,7 @@ local function isSwitched(device) end local function isBluez5AudioSink(sink_name) - if string.find(sink_name, "bluez_output.") ~= nil then + if sink_name and string.find(sink_name, "bluez_output.") ~= nil then return true end return false -- GitLab