From: hjhun <36876573+hjhun@users.noreply.github.com> Date: Tue, 17 Sep 2019 01:12:12 +0000 (+0900) Subject: [ComponentBased.ComponentManager][Adds an exception handling] (#1016) X-Git-Tag: submit/tizen/20190918.005212~1^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b90ab45e7b4a230ad8695e85a39a6d7c7eb5e569;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [ComponentBased.ComponentManager][Adds an exception handling] (#1016) To prevent null reference exception, checking a parameter is necessary. Signed-off-by: Hwankyu Jhun --- 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) {