Add argument check logic (#1009)
authorHyunho Kang <hhstark.kang@samsung.com>
Wed, 11 Sep 2019 04:26:38 +0000 (13:26 +0900)
committerGitHub <noreply@github.com>
Wed, 11 Sep 2019 04:26:38 +0000 (13:26 +0900)
* Modify native api name

Signed-off-by: hyunho <hhstark.kang@samsung.com>
* Add argument check logic

SendLaunchRequestAsync control parameter should not be null

Signed-off-by: hyunho <hhstark.kang@samsung.com>
src/Tizen.Applications.ComponentBased/Tizen.Applications.ComponentBased.Common/BaseComponent.cs

index 87dba90..f65ca2f 100644 (file)
@@ -168,6 +168,11 @@ namespace Tizen.Applications.ComponentBased.Common
         /// <since_tizen> 6 </since_tizen>
         public Task<AppControlResult> SendLaunchRequestAsync(AppControl control, AppControlReplyCallback replyAfterLaunching)
         {
+            if (control == null)
+            {
+                throw new ArgumentNullException(nameof(control));
+            }
+
             int ret = Interop.AppControl.SetCallerInstanceId(control.SafeAppControlHandle, Id);
             if (ret != 0)
                 throw new InvalidOperationException("Failed to set id");