diff --git a/src/modules/htable/ht_db.c b/src/modules/htable/ht_db.c index 5b9a5942edf..cbce085f6c5 100644 --- a/src/modules/htable/ht_db.c +++ b/src/modules/htable/ht_db.c @@ -551,6 +551,11 @@ int ht_db_save_table(ht_t *ht, str *dbtable) time_t now; int ncols; + if(ht==NULL || ht->entries==NULL) { + LM_DBG("hash table not initialized yet\n"); + return -1; + } + if(ht_db_con==NULL) { LM_ERR("no db connection\n");