fix atiny_mqtt_bind bug when handle parameter is null.
@@ -858,7 +858,13 @@ int atiny_mqtt_bind(const mqtt_device_info_s* device_info, mqtt_client_s* handle
Timer timer;
int result = ATINY_ERR;
- if((NULL == handle) || (device_info == NULL)
+ if (NULL == handle)
+ {
+ ATINY_LOG(LOG_FATAL, "handle null");
+ return ATINY_ARG_INVALID;
+ }
+
+ if((device_info == NULL)
|| (mqtt_check_device_info(device_info) != ATINY_OK))
{
ATINY_LOG(LOG_FATAL, "parameter invalid");
