From 64778fcad50815ba86a56c780b23173d03ce6bfb Mon Sep 17 00:00:00 2001 From: Robert Fewell <14uBobIT@gmail.com> Date: Sun, 22 Jul 2018 12:55:55 +0100 Subject: [PATCH] Fix error when options dialogue is open when app closed With the options dialogue open when Gnucash is closed this error is logged in the trace file, gnc_close_gui_component() component not found. This is fixed by reversing the components list found for session so the options dialogue is closed before the report window. --- libgnucash/app-utils/gnc-component-manager.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libgnucash/app-utils/gnc-component-manager.c b/libgnucash/app-utils/gnc-component-manager.c index c32be015df..2d909dc37a 100644 --- a/libgnucash/app-utils/gnc-component-manager.c +++ b/libgnucash/app-utils/gnc-component-manager.c @@ -827,6 +827,9 @@ gnc_close_gui_component_by_session (gpointer session) list = find_components_by_session (session); + // reverse the list so class like dialog-options close before window-report + list = g_list_reverse (list); + for (node = list; node; node = node->next) { ComponentInfo *ci = node->data;