Fix the return of get accessor at Representation's Interface/Attributes 96/121596/1
authorHongkuk, Son <hongkuk.son@samsung.com>
Tue, 28 Mar 2017 09:37:01 +0000 (18:37 +0900)
committerHongkuk, Son <hongkuk.son@samsung.com>
Tue, 28 Mar 2017 09:41:51 +0000 (18:41 +0900)
Signed-off-by: Hongkuk, Son <hongkuk.son@samsung.com>
Change-Id: Id6b43f4de3e45961f105e6fe82e82a69955a49cd

Tizen.Network.IoTConnectivity/Tizen.Network.IoTConnectivity/Representation.cs

index 30fe764..81e6fbc 100755 (executable)
@@ -191,7 +191,7 @@ namespace Tizen.Network.IoTConnectivity
                     Log.Error(IoTConnectivityErrorFactory.LogTag, "Failed to get interface");
                     return null;
                 }
-                return new ResourceInterfaces(interfaceHandle);
+                return (interfaceHandle == IntPtr.Zero) ? null : new ResourceInterfaces(interfaceHandle);
             }
             set
             {
@@ -236,7 +236,7 @@ namespace Tizen.Network.IoTConnectivity
                     Log.Error(IoTConnectivityErrorFactory.LogTag, "Failed to get attributes");
                     throw IoTConnectivityErrorFactory.GetException(ret);
                 }
-                return new Attributes(attributeHandle);
+                return (attributeHandle == IntPtr.Zero) ? null : new Attributes(attributeHandle);
             }
             set
             {