summaryrefslogtreecommitdiff
path: root/sbreload.m
diff options
context:
space:
mode:
Diffstat (limited to 'sbreload.m')
-rw-r--r--sbreload.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbreload.m b/sbreload.m
index e51a6bd..a0bf1f8 100644
--- a/sbreload.m
+++ b/sbreload.m
@@ -254,7 +254,7 @@ pid_t launch_get_job_pid(const char * job)
if (launch_data_get_type(resp) != LAUNCH_DATA_DICTIONARY) return -1;
launch_data_t pid_data = launch_data_dict_lookup(resp, "PID");
- if (launch_data_get_type(pid_data) != LAUNCH_DATA_INTEGER) return -1;
+ if (pid_data == NULL || launch_data_get_type(pid_data) != LAUNCH_DATA_INTEGER) return -1;
pid_t pid = (pid_t)launch_data_get_integer(pid_data);
launch_data_free(resp);