On startup, remove feed entries with empty URL on startup
This should never happen, but occasionally did when something went wrong while adding a new feed, e.g. a crash. This would then cause a segfault on startup. BUG: 495961
This commit is contained in:
parent
bb2ca5adbc
commit
170e4a4880
@ -348,5 +348,10 @@ void Database::setWalMode()
|
||||
|
||||
void Database::cleanup()
|
||||
{
|
||||
// TODO: create database sanity checks, or, alternatively, create database scrub routine
|
||||
// delete rows with empty feed urls, as this should never happen, but could
|
||||
// occur when something goes wrong (like a crash) when trying to add a new
|
||||
// feed
|
||||
QSqlQuery query;
|
||||
query.prepare(QStringLiteral("DELETE FROM Feeds WHERE url is NULL or url='';"));
|
||||
execute(query);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user