mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix broken test-backend-dbi with libdbi 0.9.
Segfaulted for an uninitialized dbi_instance.
This commit is contained in:
parent
b465fef9ac
commit
321a159af2
@ -34,7 +34,7 @@ GNUCASH_NANO_VERSION=0
|
|||||||
#src/backend/dbi/gnc-backend-dbi.c:gnc_dbi_load.
|
#src/backend/dbi/gnc-backend-dbi.c:gnc_dbi_load.
|
||||||
GNUCASH_RESAVE_VERSION=19920
|
GNUCASH_RESAVE_VERSION=19920
|
||||||
# Initialize automake -- make sure we have at least version 1.9
|
# Initialize automake -- make sure we have at least version 1.9
|
||||||
AM_INIT_AUTOMAKE([1.9 dist-bzip2])
|
AM_INIT_AUTOMAKE([1.9 dist-bzip2 subdir-objects])
|
||||||
|
|
||||||
# Parse out the version number
|
# Parse out the version number
|
||||||
GNUCASH_VERSION_STRING=AC_PACKAGE_VERSION
|
GNUCASH_VERSION_STRING=AC_PACKAGE_VERSION
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
#if LIBDBI_VERSION >= 900
|
#if LIBDBI_VERSION >= 900
|
||||||
#define HAVE_LIBDBI_R 1
|
#define HAVE_LIBDBI_R 1
|
||||||
static dbi_inst dbi_instance;
|
static dbi_inst dbi_instance = NULL;
|
||||||
#else
|
#else
|
||||||
#define HAVE_LIBDBI_R 0
|
#define HAVE_LIBDBI_R 0
|
||||||
#endif
|
#endif
|
||||||
@ -597,8 +597,11 @@ test_suite_gnc_backend_dbi (void)
|
|||||||
dbi_driver driver = NULL;
|
dbi_driver driver = NULL;
|
||||||
GList *drivers = NULL;
|
GList *drivers = NULL;
|
||||||
#if HAVE_LIBDBI_R
|
#if HAVE_LIBDBI_R
|
||||||
|
if (dbi_instance == NULL)
|
||||||
|
dbi_initialize_r (NULL, &dbi_instance);
|
||||||
while ((driver = dbi_driver_list_r (driver, dbi_instance)))
|
while ((driver = dbi_driver_list_r (driver, dbi_instance)))
|
||||||
#else
|
#else
|
||||||
|
dbi_initialize (NULL);
|
||||||
while ((driver = dbi_driver_list (driver)))
|
while ((driver = dbi_driver_list (driver)))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user