[WidgetService] fix getInstance error issue 27/91327/1
authorjk.pu <jk.pu@samsung.com>
Fri, 7 Oct 2016 05:11:51 +0000 (14:11 +0900)
committerjk.pu <jk.pu@samsung.com>
Fri, 7 Oct 2016 05:13:01 +0000 (14:13 +0900)
only negative ret value is error. positive value is instance count.

Change-Id: I6fcd37209edcf6833693dd87ab6162d8a7d84363
Signed-off-by: jk.pu <jk.pu@samsung.com>
src/widgetservice/widgetservice_instance.cc

index 91a4759..3832981 100755 (executable)
@@ -327,7 +327,7 @@ TizenResult WidgetServiceInstance::GetInstances(picojson::object const& args, co
 
     TizenResult result = TizenSuccess();
 
-    if (WIDGET_ERROR_NONE != ret) {
+    if (WIDGET_ERROR_NONE != ret && ret < 0) {
       LoggerE("widget_service_get_widget_instance_list() failed");
       result = WidgetServiceUtils::ConvertErrorCode(ret);
     } else {