From 478c790f33fd848bf42203521351f953638dcd68 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 12 Jun 2024 13:59:38 +0300 Subject: Fix build task handler crash while handling odb::deadlock --- mod/mod-build-task.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'mod/mod-build-task.cxx') diff --git a/mod/mod-build-task.cxx b/mod/mod-build-task.cxx index 6be77f6..ff52f6b 100644 --- a/mod/mod-build-task.cxx +++ b/mod/mod-build-task.cxx @@ -2261,10 +2261,13 @@ handle (request& rq, response& rs) { // Just try with the next rebuild. But first, restore the agent's // fingerprint and challenge and reset the task manifest and the - // session that we may have prepared. + // session that we have prepared. // - agent_fp = move (b->agent_fingerprint); - challenge = move (b->agent_challenge); + assert (task_build != nullptr); + + agent_fp = move (task_build->agent_fingerprint); + challenge = move (task_build->agent_challenge); + task_build = nullptr; task_response = task_response_manifest (); } -- cgit v1.1