Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 95a1355
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extensions/menubar/internal.m
Expand Up @@ -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

Expand Down

0 comments on commit 95a1355

Please sign in to comment.