From b90ab45e7b4a230ad8695e85a39a6d7c7eb5e569 Mon Sep 17 00:00:00 2001 From: hjhun <36876573+hjhun@users.noreply.github.com> Date: Tue, 17 Sep 2019 10:12:12 +0900 Subject: [PATCH] [ComponentBased.ComponentManager][Adds an exception handling] (#1016) To prevent null reference exception, checking a parameter is necessary. Signed-off-by: Hwankyu Jhun --- .../Tizen.Applications/ComponentManager.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Tizen.Applications.ComponentBased.ComponentManager/Tizen.Applications/ComponentManager.cs b/src/Tizen.Applications.ComponentBased.ComponentManager/Tizen.Applications/ComponentManager.cs index 1654e7230..4824e6f4e 100755 --- a/src/Tizen.Applications.ComponentBased.ComponentManager/Tizen.Applications/ComponentManager.cs +++ b/src/Tizen.Applications.ComponentBased.ComponentManager/Tizen.Applications/ComponentManager.cs @@ -154,6 +154,11 @@ namespace Tizen.Applications.ComponentBased /// 6 public static void TerminateBackgroundComponent(ComponentRunningContext context) { + if (context == null) + { + throw new ArgumentException("Invalid argument"); + } + Interop.ComponentManager.ErrorCode err = Interop.ComponentManager.ComponentManagerTerminateBgComponent(context._contextHandle); if (err != Interop.ComponentManager.ErrorCode.None) { -- 2.34.1