Tracker: Make sure destWindow is locked before you "Move to" it
... fixes another crash reported in #20072, this time concerning Looper must be locked. Change-Id: Ia4161609066bd2a5094f51410058dce75a630dd9
This commit is contained in:
@@ -5202,10 +5202,11 @@ BPoseView::MoveSelectionInto(Model* destFolder, BContainerWindow* srcWindow,
|
|||||||
if (okToMove) {
|
if (okToMove) {
|
||||||
PoseList* selectionList = srcWindow->PoseView()->SelectionList();
|
PoseList* selectionList = srcWindow->PoseView()->SelectionList();
|
||||||
BList* pointList = NULL;
|
BList* pointList = NULL;
|
||||||
if (destWindow != NULL) {
|
if (destWindow != NULL && destWindow->LockLooper()) {
|
||||||
// destination window is available e.g. drag and drop
|
// destination window is available e.g. drag and drop
|
||||||
pointList = destWindow->PoseView()->GetDropPointList(dragStart, dropPoint,
|
pointList = destWindow->PoseView()->GetDropPointList(dragStart, dropPoint,
|
||||||
selectionList, srcWindow->PoseView(), pinToGrid);
|
selectionList, srcWindow->PoseView(), pinToGrid);
|
||||||
|
destWindow->UnlockLooper();
|
||||||
} else {
|
} else {
|
||||||
// destination window is closed e.g. Move to/Copy to/Link to
|
// destination window is closed e.g. Move to/Copy to/Link to
|
||||||
// pose positions will be offset by their position in the source window
|
// pose positions will be offset by their position in the source window
|
||||||
@@ -5242,8 +5243,10 @@ BPoseView::MoveSelectionInto(Model* destFolder, BContainerWindow* srcWindow,
|
|||||||
moveMode = kMoveSelectionTo;
|
moveMode = kMoveSelectionTo;
|
||||||
|
|
||||||
// move will replace current selection
|
// move will replace current selection
|
||||||
if (moveMode == kMoveSelectionTo && destWindow != NULL)
|
if (moveMode == kMoveSelectionTo && destWindow != NULL && destWindow->LockLooper()) {
|
||||||
destWindow->PoseView()->ClearSelection();
|
destWindow->PoseView()->ClearSelection();
|
||||||
|
destWindow->UnlockLooper();
|
||||||
|
}
|
||||||
|
|
||||||
FSMoveToFolder(srcList, destEntry, moveMode, pointList);
|
FSMoveToFolder(srcList, destEntry, moveMode, pointList);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user