Permalink
Browse files

Fix a crash in hs.menubar caused by improper placement of a Lua stack…

…guard exit call. Closes #1746
  • Loading branch information...
cmsj committed Apr 12, 2018
1 parent 93d4bfa commit 95a13554c65568aca2ee6db040895c6345b01b50
Showing with 1 addition and 1 deletion.
  1. +1 −1 extensions/menubar/internal.m
@@ -184,8 +184,8 @@ - (void) click:(id)sender {
[self callback_runner];
// error or return value (ignored in this case), we gotta cleanup
lua_pop(self.L, 1) ;
myDelegate = nil ;
_lua_stackguard_exit(self.L);
myDelegate = nil ; // NOTE: DO NOT USE `self` AFTER THIS POINT, IT WILL HAVE BEEN DEALLOCATED.
}
@end

0 comments on commit 95a1355

Please sign in to comment.