Skip to content

Commit

Permalink
Add two missing Lua stackguard exitpoints in hs.eventtap
Browse files Browse the repository at this point in the history
  • Loading branch information
cmsj committed Apr 13, 2018
1 parent 76b2a29 commit 675e3b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions extensions/eventtap/internal.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ CGEventRef eventtap_callback(CGEventTapProxy proxy, CGEventType type, CGEventRef
if ((type == kCGEventTapDisabledByTimeout) || (type == kCGEventTapDisabledByUserInput)) {
[skin logBreadcrumb:[NSString stringWithFormat:@"eventtap restarted: (%d)", type]] ;
CGEventTapEnable(e->tap, true);
_lua_stackguard_exit(L);
return event ;
}

Expand All @@ -36,6 +37,7 @@ CGEventRef eventtap_callback(CGEventTapProxy proxy, CGEventType type, CGEventRef
[skin logError:[NSString stringWithFormat:@"hs.eventtap callback error: %s", errorMsg]];
}
lua_pop(L, 1) ; // remove error message
_lua_stackguard_exit(L);
return NULL;
}

Expand Down

0 comments on commit 675e3b4

Please sign in to comment.