From: Kevin P. Fleming Date: Wed, 14 Jul 2010 20:15:48 +0000 (+0000) Subject: Don't try to call an embedded module's backup_globals() function until X-Git-Tag: 11.0.0-beta1~2663 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e7d01d48418786d3f0abc232a2d12de7362e50e;p=thirdparty%2Fasterisk.git Don't try to call an embedded module's backup_globals() function until after confirming it exists. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276441 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/loader.c b/main/loader.c index 8a3d18bdbd..0249af9d81 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; }