Merged revisions 179361 via svnmerge from

https://origsvn.digium.com/svn/asterisk/trunk

........
  r179361 | tilghman | 2009-03-02 11:18:48 -0600 (Mon, 02 Mar 2009) | 2 lines
  
  Backport 1.6.0 fix to trunk (failsafe if db is not loaded)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@179362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2009-03-02 17:19:41 +00:00
parent 8a28840781
commit e1acfaedf0

View File

@@ -246,6 +246,11 @@ static int sqlite3_log(struct ast_cdr *cdr)
struct ast_channel dummy = { 0, }; struct ast_channel dummy = { 0, };
int count = 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 */ { /* Make it obvious that only sql should be used outside of this block */
char *escaped; char *escaped;
char subst_buf[2048]; char subst_buf[2048];