Fix logging error that crashes on bad database
This commit is contained in:
parent
658bf223f2
commit
e16844dbee
|
@ -177,13 +177,15 @@ int db_sql_fetch_row(char **pe, SQL_ROW *row, char *fmt, ...) {
|
||||||
db_sql_vmfree_fn(query);
|
db_sql_vmfree_fn(query);
|
||||||
|
|
||||||
if(err != DB_E_SUCCESS) {
|
if(err != DB_E_SUCCESS) {
|
||||||
DPRINTF(E_SPAM,L_DB,"Error: enum_begin failed: %s\n",(pe) ? *pe : "?");
|
DPRINTF(E_SPAM,L_DB,"Error: enum_begin failed (error %d): %s\n",
|
||||||
|
err,(pe) ? *pe : "?");
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
err=db_sql_enum_fetch_fn(pe, row);
|
err=db_sql_enum_fetch_fn(pe, row);
|
||||||
if(err != DB_E_SUCCESS) {
|
if(err != DB_E_SUCCESS) {
|
||||||
DPRINTF(E_SPAM,L_DB,"Error: enum_fetch failed: %s\n",*pe);
|
DPRINTF(E_SPAM,L_DB,"Error: enum_fetch failed (error %d): %s\n",
|
||||||
|
err,(pe) ? *pe : "?");
|
||||||
db_sql_enum_end_fn(NULL);
|
db_sql_enum_end_fn(NULL);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue