| Index: ui/app_list/views/apps_grid_view.cc
|
| diff --git a/ui/app_list/views/apps_grid_view.cc b/ui/app_list/views/apps_grid_view.cc
|
| index bc200c6bcc63d4757793fd8a317805db4c28bd22..84a31ab4d57c24b298ad46e22abcdd0824f40e02 100644
|
| --- a/ui/app_list/views/apps_grid_view.cc
|
| +++ b/ui/app_list/views/apps_grid_view.cc
|
| @@ -708,17 +708,19 @@ void AppsGridView::EndDrag(bool cancel) {
|
| // If we had a drag and drop proxy icon, we delete it and make the real
|
| // item visible again.
|
| drag_and_drop_host_->DestroyDragIconProxy();
|
| - if (landed_in_drag_and_drop_host) {
|
| - // Move the item directly to the target location, avoiding the "zip back"
|
| - // animation if the user was pinning it to the shelf.
|
| - int i = reorder_drop_target_.slot;
|
| - gfx::Rect bounds = view_model_.ideal_bounds(i);
|
| - drag_view_->SetBoundsRect(bounds);
|
| + // Issue 439055: MoveItemToFolder() can sometimes delete |drag_view_|
|
| + if (drag_view_) {
|
| + if (landed_in_drag_and_drop_host) {
|
| + // Move the item directly to the target location, avoiding the
|
| + // "zip back" animation if the user was pinning it to the shelf.
|
| + int i = reorder_drop_target_.slot;
|
| + gfx::Rect bounds = view_model_.ideal_bounds(i);
|
| + drag_view_->SetBoundsRect(bounds);
|
| + }
|
| + // Fade in slowly if it landed in the shelf.
|
| + SetViewHidden(drag_view_, false /* show */,
|
| + !landed_in_drag_and_drop_host /* animate */);
|
| }
|
| - // Fade in slowly if it landed in the shelf.
|
| - SetViewHidden(drag_view_,
|
| - false /* show */,
|
| - !landed_in_drag_and_drop_host /* animate */);
|
| }
|
|
|
| // The drag can be ended after the synchronous drag is created but before it
|
|
|