Skip to content

Commit e680a87

Browse files
committed
Bug 799682 - Unable to "Save As" (or open) a non-xml data file
Fixes a generic bug in gnc_module_init_backend_dbi() when HAVE_LIBDBI_R is defined. Specifically, when the initial dbi_initialize_r() returns no drivers, the dbi_instance variable is still set.
1 parent 1520c31 commit e680a87

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libgnucash/backend/dbi/gnc-backend-dbi.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,10 @@ gnc_module_init_backend_dbi (void)
10961096
{
10971097
#if HAVE_LIBDBI_R
10981098
if (dbi_instance)
1099-
return;
1099+
{
1100+
dbi_shutdown_r (dbi_instance);
1101+
dbi_instance = nullptr;
1102+
}
11001103
#endif
11011104
gchar *libdir = gnc_path_get_libdir ();
11021105
gchar *dir = g_build_filename (libdir, "dbd", nullptr);

0 commit comments

Comments
 (0)