Fix bug for invalid access variable.
when access consumer main thread but initialized, service will crash.
So this patch prevent invalid access to not initialized thread handle.
Change-Id: I77d86a712e0efe6bbec17780426df4a5ba98decc
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12815
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit
7c6e61367021005ed0fdc401513629eb6fb48d07)
Reviewed-on: https://gerrit.iotivity.org/gerrit/12899