Add exception handler for rpc-port-parcel (#394)
authorpjh9216 <jh9216.park@samsung.com>
Thu, 16 Aug 2018 03:04:56 +0000 (12:04 +0900)
committerGitHub <noreply@github.com>
Thu, 16 Aug 2018 03:04:56 +0000 (12:04 +0900)
Signed-off-by: Junghoon Park <jh9216.park@samsung.com>
src/Tizen.Applications.Common/Tizen.Applications.RPCPort/Parcel.cs

index 37d6d38..886e614 100755 (executable)
@@ -46,6 +46,8 @@ namespace Tizen.Applications.RPCPort
         /// <since_tizen> 5 </since_tizen>
         public Parcel(Port port)
         {
+            if (port == null)
+                throw new InvalidIOException();
             var r = Interop.LibRPCPort.Parcel.CreateFromPort(out _handle, port.Handle);
             if (r != Interop.LibRPCPort.ErrorCode.None)
                 throw new InvalidIOException();