Skip to content

Prevent crash when dragging a folder into its own child#701

Merged
adriengivry merged 3 commits intoOverload-Technologies:mainfrom
Gopmyc:699
Apr 14, 2026
Merged

Prevent crash when dragging a folder into its own child#701
adriengivry merged 3 commits intoOverload-Technologies:mainfrom
Gopmyc:699

Conversation

@Gopmyc
Copy link
Copy Markdown
Contributor

@Gopmyc Gopmyc commented Apr 14, 2026

Description

This PR fixes a crash in the Asset Browser when a folder is dragged and dropped into one of its own descendants.

The fix adds a local guard in the folder drag-and-drop handler to detect invalid parent->child (or self) moves before filesystem rename/copy operations are executed.
When such a move is detected, the operation is safely ignored and a warning is logged.

Related Issue(s)

Fixes #699

Review Guidance

Please focus review on:

  • Folder DDTarget logic in AssetBrowser.cpp
  • The new path ancestry guard used before move/copy operations
  • Regression risk on valid drag/drop scenarios (project/project and engine/project)

Screenshots/GIFs

N/A (behavioral crash fix; no UI change)

Checklist

  • My code follows the project's code style guidelines
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes don't generate new warnings or errors

@adriengivry adriengivry added Critical Something that should be fixed quickly Editor Something relative with the editor Crash Something that causes a crash labels Apr 14, 2026
@Gopmyc Gopmyc requested a review from adriengivry April 14, 2026 15:20
@adriengivry adriengivry merged commit 47092ea into Overload-Technologies:main Apr 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Crash Something that causes a crash Critical Something that should be fixed quickly Editor Something relative with the editor

Development

Successfully merging this pull request may close these issues.

Drag-and-dropping a parent folder onto one of its children crashes

2 participants