diff --git a/js/ui/dnd.js b/js/ui/dnd.js index 786d65419..e27c3691f 100644 --- a/js/ui/dnd.js +++ b/js/ui/dnd.js @@ -642,12 +642,13 @@ var _Draggable = class _Draggable { this._dragState = DragState.CANCELLED; if (this._actorDestroyed || wasCancelled) { + let dragActor = this._dragActor; global.display.set_cursor(Meta.Cursor.DEFAULT); if (!this._buttonDown) this._dragComplete(); this.emit('drag-end', eventTime, false); - if (!this._dragOrigParent && this._dragActor) - this._dragActor.destroy(); + if (!this._dragOrigParent && dragActor) + dragActor.destroy(); return; }