Page MenuHomePhabricator

Crash when drag and drop nodes
Closed, ResolvedPublic

Description

The reproductions steps are simple:

Have a node with 3 children (e.g. create 3 empty segmentations), drag the top two children and drop them on the third -> crash.

Fix seems incredibly simple:

Change line 198 here: https://github.com/MITK/MITK/blob/master/Modules/QtWidgets/src/QmitkDataStorageTreeModel.cpp#L198

from:

if (dropIndex == -1)

to:

if (dropIndex == -1 || dropIndex > parentItem->GetChildCount())

Event Timeline

User kislinsk has pushed new remote branch:

bug-19316-DragAndDropCrash

[c62368]: Merge branch 'bug-19316-DragAndDropCrash'

Merged commits:

2015-09-16 16:25:22 Stefan Kislinskiy [8ed1d4]
Clamp drop range.

Fix by Rostislav Khlebnikov.