From 72e13919a43d0971ea2394c7f65953c1beafbc8b Mon Sep 17 00:00:00 2001
From: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date: Thu, 29 Aug 2019 21:23:20 +0300
Subject: [PATCH] bluez: warn if the SPA bluez plugin is not installed instead
 of asserting

---
 modules/module-pw-bluez.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/module-pw-bluez.c b/modules/module-pw-bluez.c
index dd8e1afc..179a5600 100644
--- a/modules/module-pw-bluez.c
+++ b/modules/module-pw-bluez.c
@@ -417,7 +417,10 @@ start_monitor (WpRemotePipewire *remote, WpRemoteState state, gpointer data)
   /* Load the monitor handle */
   handle = (struct spa_handle *)wp_remote_pipewire_load_spa_handle (
       impl->remote_pipewire, SPA_NAME_API_BLUEZ5_MONITOR, NULL);
-  g_return_if_fail (handle);
+  if (!handle) {
+    g_message ("SPA bluez5 plugin could not be loaded; is it installed?");
+    return;
+  }
 
   /* Get the handle interface */
   res = spa_handle_get_interface(handle, SPA_TYPE_INTERFACE_Monitor, &iface);
-- 
GitLab