From 7da5ab0633a52982f11b4fb7b6cb98c39d18e2f0 Mon Sep 17 00:00:00 2001 From: Karl Chen Date: Sun, 27 Jul 2003 23:20:43 +0000 Subject: [PATCH] fixed timeout_check crash svn path=/trunk/boinc/; revision=1830 --- checkin_notes | 4 ++++ sched/timeout_check.C | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/checkin_notes b/checkin_notes index 7d71ae0bbd..d7d09fe64f 100755 --- a/checkin_notes +++ b/checkin_notes @@ -5403,3 +5403,7 @@ Karl 2003/07/25 py/* tools/* client/* + +Karl 2003/07/27 + fixed bug in timeout_check if WU has no results + sched/timeout_check.C diff --git a/sched/timeout_check.C b/sched/timeout_check.C index a08ff32f89..b0b87704d8 100644 --- a/sched/timeout_check.C +++ b/sched/timeout_check.C @@ -165,6 +165,12 @@ void handle_wu(DB_WORKUNIT& wu) { results.push_back(result); } + if (results.size() == 0) { + log_messages.printf(SchedMessages::NORMAL, "[WU#%d %s] No results\n", + wu.id, wu.name); + return; + } + log_messages.printf(SchedMessages::DEBUG, "[WU#%d %s] enumerated %d results\n", wu.id, wu.name, (int)results.size());