From 844df0d7a4819dce82381dc753461c4468eb9911 Mon Sep 17 00:00:00 2001 From: John Scipione Date: Mon, 30 Jun 2014 17:23:17 -0400 Subject: [PATCH] ProcessController: Fix CID 701784 Unchecked return value (CHECKED_RETURN) If get_team_usage_info() fails set the times to 0. Also remove unused get_team_info() call. --- src/apps/processcontroller/TeamBarMenuItem.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apps/processcontroller/TeamBarMenuItem.cpp b/src/apps/processcontroller/TeamBarMenuItem.cpp index 349ecfe45d..82f7e31cb1 100644 --- a/src/apps/processcontroller/TeamBarMenuItem.cpp +++ b/src/apps/processcontroller/TeamBarMenuItem.cpp @@ -46,9 +46,9 @@ TeamBarMenuItem::TeamBarMenuItem(BMenu* menu, BMessage* kill_team, team_id team, void TeamBarMenuItem::Init() { - team_info teamInfo; - get_team_info(fTeamID, &teamInfo); - get_team_usage_info(fTeamID, B_USAGE_SELF, &fTeamUsageInfo); + if (get_team_usage_info(fTeamID, B_USAGE_SELF, &fTeamUsageInfo) != B_OK) + fTeamUsageInfo.kernel_time = fTeamUsageInfo.user_time = 0; + if (fTeamID == B_SYSTEM_TEAM) { thread_info thinfos; bigtime_t idle = 0;