Check that db_pl_fetch_byquery only gets 1 query result
This commit is contained in:
parent
6a1c01fa15
commit
1a397ca79b
9
src/db.c
9
src/db.c
|
@ -1644,8 +1644,17 @@ db_pl_fetch_byquery(char *query)
|
|||
}
|
||||
}
|
||||
|
||||
ret = sqlite3_step(stmt);
|
||||
sqlite3_finalize(stmt);
|
||||
|
||||
if (ret != SQLITE_DONE)
|
||||
{
|
||||
DPRINTF(E_WARN, L_DB, "Query had more than a single result!\n");
|
||||
|
||||
free_pli(pli, 0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Playlist 1: all files */
|
||||
if (pli->id == 1)
|
||||
pli->items = db_files_get_count();
|
||||
|
|
Loading…
Reference in New Issue