Fix a bug of RCSResourceObject. 35/7435/2
authorcoderhyme <jhyo.kim@samsung.com>
Tue, 29 Mar 2016 10:06:54 +0000 (03:06 -0700)
committerUze Choi <uzchoi@samsung.com>
Tue, 29 Mar 2016 16:19:43 +0000 (16:19 +0000)
The problem was that when handler is canceled, segfault ocuured.

Change-Id: I04f4bae70db986245566f97f8388dc39254fb828
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/7435
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/resource-encapsulation/src/serverBuilder/src/RCSResourceObject.cpp

index 4d37f6f..1a40150 100644 (file)
@@ -88,7 +88,7 @@ namespace
     RESPONSE invokeHandler(RCSResourceAttributes& attrs, const RCSRequest& request,
             std::shared_ptr< HANDLER > handler)
     {
-        if (handler)
+        if (handler && *handler)
         {
             return (*handler)(request, attrs);
         }