Tracker: Fix crash when destWindow is NULL, fixes #20072.
Regression from hrev59676. Unfortunately pose positions are offset by position in source window in this case, like in #19698. Change-Id: I5278f7f473fa52f35df9019a4cb93b4f7aab53ef Reviewed-on: https://review.haiku-os.org/c/haiku/+/10925 Reviewed-by: John Scipione <[email protected]>
This commit is contained in:
@@ -5201,8 +5201,17 @@ BPoseView::MoveSelectionInto(Model* destFolder, BContainerWindow* srcWindow,
|
||||
|
||||
if (okToMove) {
|
||||
PoseList* selectionList = srcWindow->PoseView()->SelectionList();
|
||||
BList* pointList = destWindow->PoseView()->GetDropPointList(dragStart, dropPoint,
|
||||
selectionList, srcWindow->PoseView(), pinToGrid);
|
||||
BList* pointList = NULL;
|
||||
if (destWindow != NULL) {
|
||||
// destination window is available e.g. drag and drop
|
||||
pointList = destWindow->PoseView()->GetDropPointList(dragStart, dropPoint,
|
||||
selectionList, srcWindow->PoseView(), pinToGrid);
|
||||
} else {
|
||||
// destination window is closed e.g. Move to/Copy to/Link to
|
||||
// pose positions will be offset by their position in the source window
|
||||
pointList = srcWindow->PoseView()->GetDropPointList(dragStart, dropPoint,
|
||||
selectionList, srcWindow->PoseView(), pinToGrid);
|
||||
}
|
||||
int32 selectionSize = srcWindow->PoseView()->CountSelected();
|
||||
BObjectList<entry_ref, true>* srcList = new BObjectList<entry_ref, true>(selectionSize);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user