Commit 7a27d4d6 authored by sky's avatar sky Committed by Commit bot

Fixes possible crash in tab dragging

This crash would happen if you select a couple of tabs, then click but
don't drag and hit escape or control-w. The crash would occur because
we would end up inserting the tabs a second time even though they are
already in the tabstrip.

BUG=360822
TEST=see bug
R=ben@chromium.org

Review URL: https://codereview.chromium.org/548703002

Cr-Commit-Position: refs/heads/master@{#293625}
parent e69b9325
......@@ -1358,7 +1358,8 @@ void TabDragController::EndDragImpl(EndDragType type) {
}
} else if (drag_data_.size() > 1) {
initial_selection_model_.Clear();
RevertDrag();
if (started_drag_)
RevertDrag();
} // else case the only tab we were dragging was deleted. Nothing to do.
// Clear out drag data so we don't attempt to do anything with it.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment