diff options
Diffstat (limited to 'src/heartbeat.c')
-rw-r--r-- | src/heartbeat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/heartbeat.c b/src/heartbeat.c index 0f8d2f3..cee852e 100644 --- a/src/heartbeat.c +++ b/src/heartbeat.c @@ -74,13 +74,13 @@ heartbeat_error_t heartbeat_client_new(idevice_t device, lockdownd_service_descr { *client = NULL; - debug_info("Creating heartbeat_client, port = %d.", service->port); - - if (!device || service->port == 0 || !client || *client) { + if (!device || !service || service->port == 0 || !client || *client) { debug_info("Incorrect parameter passed to heartbeat_client_new."); return HEARTBEAT_E_INVALID_ARG; } + debug_info("Creating heartbeat_client, port = %d.", service->port); + property_list_service_client_t plclient = NULL; heartbeat_error_t ret = heartbeat_error(property_list_service_client_new(device, service, &plclient)); if (ret != HEARTBEAT_E_SUCCESS) { |