Skip to content

Commit

Permalink
fixed regression crash when deleting a node with children (#2476)
Browse files Browse the repository at this point in the history
  • Loading branch information
giuspen committed Apr 3, 2024
1 parent 232862a commit 4cbcd94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ct/ct_actions_tree.cc
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,8 @@ void CtActions::node_delete()
std::function<void(Gtk::TreeIter, int)> f_collect_ids_to_rm;
std::list<gint64> nodeIdsToRemove;
std::list<std::string> lstNodesWarn;
f_collect_ids_to_rm = [this, &ctTreeStore, &nodeIdsToRemove, &lstNodesWarn, f_collect_ids_to_rm](Gtk::TreeIter iter,
const int level) {
f_collect_ids_to_rm = [this, &ctTreeStore, &nodeIdsToRemove, &lstNodesWarn, &f_collect_ids_to_rm](Gtk::TreeIter iter,
const int level) {
CtTreeIter ctTreeIter = ctTreeStore.to_ct_tree_iter(iter);
nodeIdsToRemove.push_back(ctTreeIter.get_node_id());
if (lstNodesWarn.size() > 15) {
Expand Down
2 changes: 1 addition & 1 deletion src/ct/ct_storage_control.cc
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
if (ctTreeStore.populate_shared_nodes_map(shared_nodes_map) > 0u) {
std::function<void(Gtk::TreeIter)> f_collect_ids_to_export;
std::list<gint64> nodeIdsToExport;
f_collect_ids_to_export = [&ctTreeStore, &nodeIdsToExport, f_collect_ids_to_export](Gtk::TreeIter iter) {
f_collect_ids_to_export = [&ctTreeStore, &nodeIdsToExport, &f_collect_ids_to_export](Gtk::TreeIter iter) {
CtTreeIter ctTreeIter = ctTreeStore.to_ct_tree_iter(iter);
nodeIdsToExport.push_back(ctTreeIter.get_node_id());
for (Gtk::TreeIter child : iter->children()) {
Expand Down

0 comments on commit 4cbcd94

Please sign in to comment.