Backport 1.6.0 fix to trunk (failsafe if db is not loaded)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@179361 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
2d95f1b342
commit
6628131bf6
|
@ -240,6 +240,11 @@ static int sqlite3_log(struct ast_cdr *cdr)
|
|||
struct ast_channel dummy = { 0, };
|
||||
int count = 0;
|
||||
|
||||
if (db == NULL) {
|
||||
/* Should not have loaded, but be failsafe. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
{ /* Make it obvious that only sql should be used outside of this block */
|
||||
char *escaped;
|
||||
char subst_buf[2048];
|
||||
|
|
Reference in New Issue