EXPORT_API int ctx_sensor_rec_start(const char* subject, ctx_sensor_rec_option_h option)
{
- IF_FAIL_RETURN(subject && option, E_PARAM);
+ IF_FAIL_RETURN(subject, E_PARAM);
+
+ std::string optionStr("");
- std::string optionStr = __mapToJson(*static_cast<ctx_sensor_rec_option_t*>(option));
+ if (option)
+ optionStr = __mapToJson(*static_cast<ctx_sensor_rec_option_t*>(option));
GVariant* param = g_variant_new("(ss)", subject, optionStr.c_str());
return __getServiceProxy()->call(METHOD_START_REC, param);