Commit 9d657f1c authored by Sushil Yadav's avatar Sushil Yadav Committed by Ashok Babu Channa

[IOT-2678] Adding Null check to fix crash

Change-Id: I360d5ffbe468f16e40a1f1f3171edd1c0d23e94d
Signed-off-by: default avatarSushil Yadav <sushil.ky@samsung.com>
parent 61d276f0
...@@ -3975,6 +3975,12 @@ OCStackResult OC_CALL OCStartPresence(const uint32_t ttl) ...@@ -3975,6 +3975,12 @@ OCStackResult OC_CALL OCStartPresence(const uint32_t ttl)
{ {
OIC_LOG(INFO, TAG, "Entering OCStartPresence"); OIC_LOG(INFO, TAG, "Entering OCStartPresence");
uint8_t tokenLength = CA_MAX_TOKEN_LEN; uint8_t tokenLength = CA_MAX_TOKEN_LEN;
if (NULL == presenceResource.handle)
{
OIC_LOG(ERROR, TAG, "Invalid Presence Resource Handle: Not Initialized");
return OC_STACK_ERROR;
}
OCChangeResourceProperty( OCChangeResourceProperty(
&(((OCResource *)presenceResource.handle)->resourceProperties), &(((OCResource *)presenceResource.handle)->resourceProperties),
OC_ACTIVE, 1); OC_ACTIVE, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment