From: kibak.yoon Date: Thu, 3 Nov 2016 08:48:16 +0000 (+0900) Subject: sensord: fix the bug that handles are pushed to a list regardless of return value X-Git-Tag: accepted/tizen/3.0/common/20161114.082803^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F53%2F95453%2F1;p=platform%2Fcore%2Fsystem%2Fsensord.git sensord: fix the bug that handles are pushed to a list regardless of return value Change-Id: Ibf13b5262ae66274b758b065822c634959f5bbbb Signed-off-by: kibak.yoon --- diff --git a/src/server/sensor_loader.cpp b/src/server/sensor_loader.cpp index 89d678b..f606d29 100644 --- a/src/server/sensor_loader.cpp +++ b/src/server/sensor_loader.cpp @@ -105,8 +105,8 @@ bool sensor_loader::load(void) for_each(unique_device_hal_paths.begin(), unique_device_hal_paths.end(), [&](const string &path) { void *handle; - load_sensor_devices(path, handle); - m_handles.push_back(handle); + if (load_sensor_devices(path, handle)) + m_handles.push_back(handle); } );