Commit ea11871d authored by Ghislain MARY's avatar Ghislain MARY

Fix bug in linphone_core_get_call_history_size() when no database has been set.

parent acd22269
......@@ -610,7 +610,10 @@ int linphone_core_get_call_history_size(LinphoneCore *lc) {
sqlite3_stmt *selectStatement;
int returnValue;
if (!lc || lc->logs_db == NULL) return 0;
if (!lc)
return 0;
if (!lc->logs_db)
return (int)bctbx_list_size(lc->call_logs);
buf = sqlite3_mprintf("SELECT count(*) FROM call_history");
returnValue = sqlite3_prepare_v2(lc->logs_db, buf, -1, &selectStatement, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment