From b9077bccd396dfd6dc14673350a71428f1ea6258 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Sat, 29 Oct 2022 17:45:35 -0700 Subject: [PATCH] Bug 798640 - Segfault when running saved report --- libgnucash/engine/Account.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libgnucash/engine/Account.cpp b/libgnucash/engine/Account.cpp index 5b80ef5a8f..c9fe32b7a6 100644 --- a/libgnucash/engine/Account.cpp +++ b/libgnucash/engine/Account.cpp @@ -6259,6 +6259,8 @@ gboolean xaccAccountRegister (void) using AccountSet = std::unordered_set; static void maybe_add_descendants (Account* acc, gpointer arg) { + g_return_if_fail (acc); + if (static_cast (arg)->insert (acc).second) g_list_foreach (GET_PRIVATE(acc)->children, (GFunc) maybe_add_descendants, arg); };