diff --git a/src/effects/private/qml/WindowHeapDelegate.qml b/src/effects/private/qml/WindowHeapDelegate.qml index cfdf5eba0c..a277d48bed 100644 --- a/src/effects/private/qml/WindowHeapDelegate.qml +++ b/src/effects/private/qml/WindowHeapDelegate.qml @@ -411,9 +411,11 @@ Item { var globalPos = targetScreen.mapToGlobal(centroid.scenePosition); effect.checkItemDroppedOutOfScreen(globalPos, thumbSource); - // else, return to normal without reparenting - thumbSource.deleteDND(); - thumb.substate = "normal"; + if (typeof thumbSource !== "undefined") { + // else, return to normal without reparenting + thumbSource.deleteDND(); + thumb.substate = "normal"; + } } } }