Skip to content

Commit 95a1355

Browse files
committed
Fix a crash in hs.menubar caused by improper placement of a Lua stackguard exit call. Closes #1746
1 parent 93d4bfa commit 95a1355

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extensions/menubar/internal.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ - (void) click:(id)sender {
184184
[self callback_runner];
185185
// error or return value (ignored in this case), we gotta cleanup
186186
lua_pop(self.L, 1) ;
187-
myDelegate = nil ;
188187
_lua_stackguard_exit(self.L);
188+
myDelegate = nil ; // NOTE: DO NOT USE `self` AFTER THIS POINT, IT WILL HAVE BEEN DEALLOCATED.
189189
}
190190
@end
191191

0 commit comments

Comments
 (0)