Skip to content

Commit 9081e67

Browse files
Don't allow drag-and-drop onto OSX backdrop windows
There is no associated MCStack object so there is nothing to handle the operation, resulting in NULL dereference.
1 parent ae2b501 commit 9081e67

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

docs/notes/bugfix-16699.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Fix a crash when dragging onto a backdrop on OSX
2+

engine/src/dispatch.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,6 +1591,8 @@ MCDragAction MCDispatch::wmdragmove(Window w, int2 x, int2 y)
15911591
static uint4 s_old_modifiers = 0;
15921592

15931593
MCStack *target = findstackd(w);
1594+
if (target == nil)
1595+
return DRAG_ACTION_NONE;
15941596

15951597
// IM-2013-10-08: [[ FullscreenMode ]] Translate mouse location to stack coords
15961598
MCPoint t_mouseloc;

0 commit comments

Comments
 (0)