Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Unified Diff: util/mac/service_management.cc

Issue 593183003: Add a missing null pointer check. (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698