summaryrefslogtreecommitdiff
path: root/Userland/DevTools/Profiler
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2022-12-08 14:50:31 +0100
committerLinus Groh <mail@linusgroh.de>2022-12-10 11:49:24 +0000
commit8940f2da7fec4b4e375777c861e65ff04465f255 (patch)
treed1ac58cae77af94ea378a93fb818e8787faed542 /Userland/DevTools/Profiler
parente338a0656dd8e99e9ed64abf98d15e219adb9755 (diff)
downloadserenity-8940f2da7fec4b4e375777c861e65ff04465f255.zip
LibCore: Use `Core::Stream` for `ProcessStatisticsReader`
Diffstat (limited to 'Userland/DevTools/Profiler')
-rw-r--r--Userland/DevTools/Profiler/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/DevTools/Profiler/main.cpp b/Userland/DevTools/Profiler/main.cpp
index c06a6057dc..fe3bad2b65 100644
--- a/Userland/DevTools/Profiler/main.cpp
+++ b/Userland/DevTools/Profiler/main.cpp
@@ -352,8 +352,8 @@ bool generate_profile(pid_t& pid)
DeprecatedString process_name;
auto all_processes = Core::ProcessStatisticsReader::get_all();
- if (all_processes.has_value()) {
- auto& processes = all_processes->processes;
+ if (!all_processes.is_error()) {
+ auto& processes = all_processes.value().processes;
if (auto it = processes.find_if([&](auto& entry) { return entry.pid == pid; }); it != processes.end())
process_name = it->name;
else