From 4f20970549cdc58d340e7e789289087d3daff956 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Sun, 14 Oct 2001 17:43:43 +0000 Subject: [PATCH] * src/gnc-module/gnc-module.c (gnc_module_system_init): add some error checking -- may need a way to return errors. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5605 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/gnc-module/gnc-module.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/gnc-module/gnc-module.c b/src/gnc-module/gnc-module.c index fe0b9b4a9c..3f0b2db6f1 100644 --- a/src/gnc-module/gnc-module.c +++ b/src/gnc-module/gnc-module.c @@ -130,17 +130,23 @@ gnc_module_system_setup_load_path(void) void gnc_module_system_init(void) - { if(loaded_modules == NULL) { loaded_modules = g_hash_table_new(g_direct_hash, g_direct_equal); - lt_dlinit(); - gnc_module_system_setup_load_path(); - - /* now crawl the GNC_MODULE_PATH to find likely libraries */ - gnc_module_system_refresh(); + if(lt_dlinit() == 0) + { + gnc_module_system_setup_load_path(); + + /* now crawl the GNC_MODULE_PATH to find likely libraries */ + gnc_module_system_refresh(); + } + else + { + /* FIXME: there's no way to report this error to the caller. */ + g_warning ("gnc module system couldn't initialize libltdl"); + } } }