From a33b9eef84864cfc7f4030a0ac98ae3cdcf027a0 Mon Sep 17 00:00:00 2001 From: Decoder07 Date: Thu, 23 May 2024 17:03:34 +0530 Subject: [PATCH] Fixed error --- .../hms_video_plugin/methods/HMSVirtualBackgroundAction.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/hms_video_plugin/android/src/main/kotlin/live/hms/hms_video_plugin/methods/HMSVirtualBackgroundAction.kt b/packages/hms_video_plugin/android/src/main/kotlin/live/hms/hms_video_plugin/methods/HMSVirtualBackgroundAction.kt index ba730bab4..8b2d328b3 100644 --- a/packages/hms_video_plugin/android/src/main/kotlin/live/hms/hms_video_plugin/methods/HMSVirtualBackgroundAction.kt +++ b/packages/hms_video_plugin/android/src/main/kotlin/live/hms/hms_video_plugin/methods/HMSVirtualBackgroundAction.kt @@ -104,7 +104,11 @@ class HMSVirtualBackgroundAction { } private fun isSupported(result: Result){ - result.success(HMSResultExtension.toDictionary(true,virtualBackgroundPlugin?.isSupported())) + virtualBackgroundPlugin?.let {_virtualBackgroundPlugin -> + result.success(HMSResultExtension.toDictionary(true,_virtualBackgroundPlugin.isSupported())) + }?:run{ + result.success(HMSResultExtension.toDictionary(true,false)) + } } } } \ No newline at end of file