Skip to content

Commit cd64988

Browse files
[[ Bug 13644 ]] wait loop not being broken
1 parent 06ec955 commit cd64988

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

docs/notes/bugfix-13644.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# wait loop not being broken

engine/src/mac-core.mm

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,16 +241,20 @@ - (OSErr)preDispatchAppleEvent: (const AppleEvent *)p_event withReply: (AppleEve
241241

242242
if (aeclass == kCoreEventClass && aeid == kAEAnswer)
243243
return MCAppleEventHandlerDoAEAnswer(p_event, p_reply, 0);
244-
244+
245+
// SN-2014-10-13: [[ Bug 13644 ]] Break the wait loop after we handled the Apple Event
245246
OSErr t_err;
246247
t_err = MCAppleEventHandlerDoSpecial(p_event, p_reply, 0);
247-
if (t_err != errAEEventNotHandled)
248-
return t_err;
248+
if (t_err == errAEEventNotHandled)
249+
{
250+
if (aeclass == kCoreEventClass && aeid == kAEOpenDocuments)
251+
t_err = MCAppleEventHandlerDoOpenDoc(p_event, p_reply, 0);
252+
}
249253

250-
if (aeclass == kCoreEventClass && aeid == kAEOpenDocuments)
251-
return MCAppleEventHandlerDoOpenDoc(p_event, p_reply, 0);
254+
if (t_err != errAEEventNotHandled)
255+
MCPlatformBreakWait();
252256

253-
return errAEEventNotHandled;
257+
return t_err;
254258
}
255259

256260
- (void)applicationWillFinishLaunching: (NSNotification *)notification

0 commit comments

Comments
 (0)