Index: util/mac/service_management.cc |
diff --git a/util/mac/service_management.cc b/util/mac/service_management.cc |
index 512a6059a9b422318e89df71a00de36fd740d2db..0e19114484b6eb147a0985a3afbadb536a03dc66 100644 |
--- a/util/mac/service_management.cc |
+++ b/util/mac/service_management.cc |
@@ -129,6 +129,10 @@ pid_t ServiceManagementIsJobRunning(const std::string& label) { |
} |
launch_data_t pid = launch_data_dict_lookup(dictionary, LAUNCH_JOBKEY_PID); |
+ if (!pid) { |
+ return 0; |
+ } |
+ |
if (launch_data_get_type(pid) != LAUNCH_DATA_INTEGER) { |
return 0; |
} |