Change-Id: I5d5f77838c66aff4cfe1c4bbf7d04d5386a222f2
Signed-off-by: Jaewook Jung <jw0213.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11129
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Jon A. Cruz <jon@joncruz.org>
env->DeleteLocalRef(jHeaderOptionList);
jthrowable ex = env->ExceptionOccurred();
env->ExceptionClear();
+#ifndef WITH_CLOUD
m_ownerResource->removeOnObserveListener(env, m_jwListener);
+#else
+ if (nullptr != m_ownerResource)
+ {
+ m_ownerResource->removeOnObserveListener(env, m_jwListener);
+ }
+ if (nullptr != m_ownerAccountManager)
+ {
+ m_ownerAccountManager->removeOnObserveListener(env, m_jwListener);
+ }
+#endif
env->Throw((jthrowable)ex);
}