Component not found error when accounts are deleted

When accounts are deleted that have an open register window a component
not found error is triggered. After the account is destroyed, a call to
'gnc_resume_gui_refresh' calls 'gnc_gui_refresh_internal' and this then
calls 'find_component_ids_by_class' which is used in order resulting in
'register-single' being unregistered before 'GncPluginPageRegister' and
hence 'ld' being freed but the register not knowing this. Reversing the
list fixes this.
pull/319/head
Robert Fewell 8 years ago
parent 34d921803d
commit f1dd8cfaf1

@ -594,6 +594,7 @@ close_handler (gpointer user_data)
return;
gnc_unregister_gui_component (ld->component_id);
ld->component_id = NO_COMPONENT;
if (ld->destroy)
ld->destroy (ld);

@ -690,6 +690,8 @@ gnc_gui_refresh_internal (gboolean force)
#endif
list = find_component_ids_by_class (NULL);
// reverse the list so class GncPluginPageRegister is before register-single
list = g_list_reverse (list);
for (node = list; node; node = node->next)
{

Loading…
Cancel
Save