aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-14 20:15:48 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-14 20:15:48 +0000
commitbc8a8e4c642f07e8c5bf6adcf5a47d3073ff50b6 (patch)
treee645027556d6e9d5858b8ec04fe6a912b60661f9 /main
parent2d1c0b787c2df68458609498ce2f3ed4276f1927 (diff)
Don't try to call an embedded module's backup_globals() function until
after confirming it exists. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@276441 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/loader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/loader.c b/main/loader.c
index 8a3d18bdb..0249af9d8 100644
--- a/main/loader.c
+++ b/main/loader.c
@@ -836,7 +836,7 @@ static enum ast_module_load_result load_resource(const char *resource_name, unsi
return required ? AST_MODULE_LOAD_FAILURE : AST_MODULE_LOAD_DECLINE;
}
- if (!mod->lib && mod->info->backup_globals()) {
+ if (!mod->lib && mod->info->backup_globals && mod->info->backup_globals()) {
ast_log(LOG_WARNING, "Module '%s' was unable to backup its global data.\n", resource_name);
return required ? AST_MODULE_LOAD_FAILURE : AST_MODULE_LOAD_DECLINE;
}