Skip to content

Commit

Permalink
Better solution...
Browse files Browse the repository at this point in the history
  • Loading branch information
lwindolf committed Feb 28, 2015
1 parent 28bfbde commit d75241b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/db.c
Original file line number Diff line number Diff line change
Expand Up @@ -1588,9 +1588,6 @@ db_node_find (nodePtr node, gpointer id)
{
GSList *iter;

if (!id)
return;

if (g_str_equal (node->id, (gchar *)id))
return TRUE;

Expand Down Expand Up @@ -1632,7 +1629,7 @@ db_node_cleanup (nodePtr root)
while (sqlite3_step (stmt) == SQLITE_ROW) {
/* Drop node ids not in feed list anymore */
const gchar *id = sqlite3_column_text (stmt, 0);
if (!db_node_find (root, (gpointer)id)) {
if (id && !db_node_find (root, (gpointer)id)) {
db_subscription_remove (id); /* in case it is a subscription */
db_node_remove (id); /* in case it is a folder */
}
Expand Down

0 comments on commit d75241b

Please sign in to comment.