module-tizenaudio-policy: Fix crash when manual device is not set 95/206295/2
authorjungsup lee <jungsup4.lee@samsung.com>
Thu, 16 May 2019 04:46:52 +0000 (13:46 +0900)
committerjungsup lee <jungsup4.lee@samsung.com>
Thu, 16 May 2019 05:52:44 +0000 (14:52 +0900)
Skip route_change_hook_cb when manual device is null even if route type is manual series

[Version] 11.1.45
[Issue type] Bug fix

Change-Id: Icc1a00eb2fe9dedfc6592f6f49cc840fe5b2095c
Signed-off-by: jungsup lee <jungsup4.lee@samsung.com>
packaging/pulseaudio-modules-tizen.spec
src/module-tizenaudio-policy.c

index 1b6a094..f06556f 100644 (file)
@@ -1,6 +1,6 @@
 Name:             pulseaudio-modules-tizen
 Summary:          Pulseaudio modules for Tizen
-Version:          11.1.44
+Version:          11.1.45
 Release:          0
 Group:            Multimedia/Audio
 License:          LGPL-2.1+
index d3b106b..10cfcce 100644 (file)
@@ -1106,6 +1106,12 @@ static pa_hook_result_t route_change_hook_cb(pa_core *c, pa_stream_manager_hook_
         pa_log_error("[ROUTE] available devices is NULL, do nothing...");
         return PA_HOOK_OK;
     }
+
+    if (IS_MANUAL_ROUTE_TYPE_SERIES(data->route_type) && !data->idx_manual_devices) {
+        pa_log_error("[ROUTE] manual devices is NULL, do nothing...");
+        return PA_HOOK_OK;
+    }
+
     route_info.role = data->stream_role;
 
     if (IS_AUTO_ROUTE_TYPE_SERIES(data->route_type)) {