Skip to content

Commit

Permalink
nemo-icon-container.c: Wait to un-freeze canvas updates until the
Browse files Browse the repository at this point in the history
renaming operation has completed.

When a rename was attempted while a view was still loading, the icon
being renamed could lose its canvas item due to a re-layout, causing
a segfault when trying to access is in set_pending_icon_to_reveal().

This allows the end-rename sequence to complete before triggering the
layout to be updated.

Fixes #1981
  • Loading branch information
mtwebster committed May 15, 2019
1 parent 0bb23d9 commit 357b6c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libnemo-private/nemo-icon-container.c
Original file line number Diff line number Diff line change
Expand Up @@ -6984,8 +6984,6 @@ nemo_icon_container_end_renaming_mode (NemoIconContainer *container, gboolean co

container->details->renaming_allocation_count = 0;

nemo_icon_container_unfreeze_updates (container);

if (commit) {
set_pending_icon_to_reveal (container, icon);
}
Expand All @@ -7007,6 +7005,8 @@ nemo_icon_container_end_renaming_mode (NemoIconContainer *container, gboolean co

gtk_widget_hide (container->details->rename_widget);
g_free (container->details->original_text);

nemo_icon_container_unfreeze_updates (container);
}

void
Expand Down

0 comments on commit 357b6c5

Please sign in to comment.