Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nil reference in BridgeSupport.lua #4

Merged
merged 1 commit into from
Oct 26, 2014
Merged

Conversation

GranPC
Copy link
Contributor

@GranPC GranPC commented Oct 26, 2014

_curObj was being set to nil in line 136. By keeping a local reference, setting it to nil won't affect lazy loaded functions.

_curObj was being set to nil in line 136. By keeping a local reference, setting it to nil won't affect lazy loaded functions.
@GranPC
Copy link
Contributor Author

GranPC commented Oct 26, 2014

This fixes functions such as NSUserName() crashing like this:

[objc/BridgeSupport.lua:123]    lazy loading fun
/usr/local/bin/luajit: ./objc/BridgeSupport.lua:124: attempt to index upvalue '_curObj' (a nil value)

fjolnir added a commit that referenced this pull request Oct 26, 2014
Fix nil reference in BridgeSupport.lua
@fjolnir fjolnir merged commit c94edb9 into fjolnir:master Oct 26, 2014
@fjolnir
Copy link
Owner

fjolnir commented Oct 26, 2014

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants