Skip to content

Commit abdd9bf

Browse files
committed
[Bug 15091] Go to card on mouseDown causes crash
1 parent 5a8fe4b commit abdd9bf

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

docs/notes/bugfix-15091.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# go to card on mousedown causes crash on IDE

engine/src/desktop.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,11 @@ void MCPlatformHandleMouseUp(MCPlatformWindowRef p_window, uint32_t p_button, ui
387387
MCbuttonstate &= ~(1 << p_button);
388388

389389
MCeventtime = MCPlatformGetEventTime();
390-
390+
391+
// PM-2015-03-30: [[ Bug 15091 ]] When we "go to card X" on mouseDown, MCclickstackptr becomes nil because of MCStack::close().
392+
if (MCclickstackptr == nil)
393+
MCclickstackptr = MCmousestackptr;
394+
391395
MCObject *t_target;
392396
t_target = t_menu != nil ? t_menu : MCclickstackptr;
393397

0 commit comments

Comments
 (0)