dect
/
asterisk
Archived
13
0
Fork 0

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:
tilghman 2009-03-02 17:18:48 +00:00
parent 2d95f1b342
commit 6628131bf6
1 changed files with 5 additions and 0 deletions

View File

@ -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];