From ab425e229ec3e4dd9cfe1cbb4a1eb562437e4131 Mon Sep 17 00:00:00 2001 From: Niklas Schmelzle Date: Mon, 28 Nov 2022 09:56:40 -0500 Subject: [PATCH] fix segfault when no progress flag set --- src/algorithms/path_sgd_layout.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/algorithms/path_sgd_layout.cpp b/src/algorithms/path_sgd_layout.cpp index 2e0bd7e3..8f46f028 100644 --- a/src/algorithms/path_sgd_layout.cpp +++ b/src/algorithms/path_sgd_layout.cpp @@ -374,7 +374,9 @@ namespace odgi { term_updates_local++; if (term_updates_local >= 1000) { term_updates += term_updates_local; - progress_meter->increment(term_updates_local); + if (progress) { + progress_meter->increment(term_updates_local); + } term_updates_local = 0; } }