Repository navigation
Conversation
…tion nemo_centered_placement_grid_clear_grid_for_selection() collects the icons sitting in the cells it needs for the drop and pushes them aside. The grid (container->details->dnd_grid) is populated once at drag start from container->details->icons, but at drop time the icons are looked up again with get_icon_at_grid_position(), which searches the live icon list and returns NULL when nothing is at a marked position. Signed-off-by: Kioubit <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
nemo-desktop crashes on a desktop drag and drop when an icon is removed or re-created while the drag is active.
The drag and drop grid (container->details->dnd_grid) is created once at drag start (at nemo-icon-dnd.c:105-108 : pre_populate() over details->icons)
At drop time prep_selection() mutates that same grid (unmark_icon:1209, mark_position:1243,1294) and clear_grid_for_selection() collects the icons in the way with get_icon_at_grid_position(), which searches the live icon list and returns NULL when a marked cell has no icon. The collect loop assumes it never does and crashes.
Steps to reproduce (desktop icons, centered placement):
sleep 5; rm ~/Desktop/file.txtwherefile.txtis the second file in the columnfile.txtdisappears, release the dragRelated to issue #1775