Skip to content

Commit

Permalink
Fixes #1272: crash on moving feed into new folder
Browse files Browse the repository at this point in the history
  • Loading branch information
lwindolf committed Aug 2, 2023
1 parent 3acb5bc commit 1981d49
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ui/ui_dnd.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ ui_dnd_feed_drag_data_received (GtkTreeDragDest *drag_dest, GtkTreePath *dest, G
newParent->children = NULL;
node->parent = newParent;

debug (DEBUG_GUI, "new newParent child list:");
debug (DEBUG_GUI, "new parent child list:");

/* and rebuild it from the tree model */
if (feedlist_get_root() != newParent)
Expand Down Expand Up @@ -218,13 +218,14 @@ ui_dnd_feed_drag_data_received (GtkTreeDragDest *drag_dest, GtkTreePath *dest, G
debug (DEBUG_GUI, " -> %d: adding %s", pos, child->title);
newParent->children = g_slist_append (newParent->children, child);
}
valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (drag_dest), &iter2);
pos++;
} else {
debug (DEBUG_GUI, " -> removing empty node");
/* remove possible existing "(empty)" node from newParent */
feed_list_view_remove_empty_node (&parentIter);
valid = FALSE;
}
valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (drag_dest), &iter2);
pos++;
}

db_node_update (node);
Expand Down

0 comments on commit 1981d49

Please sign in to comment.