Signed-off-by: Hongkuk, Son <hongkuk.son@samsung.com>
Change-Id: Id6b43f4de3e45961f105e6fe82e82a69955a49cd
Log.Error(IoTConnectivityErrorFactory.LogTag, "Failed to get interface");
return null;
}
- return new ResourceInterfaces(interfaceHandle);
+ return (interfaceHandle == IntPtr.Zero) ? null : new ResourceInterfaces(interfaceHandle);
}
set
{
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
{