for some time my application had problems with the luabind::adopt policy
when nil was passed via the specified parameter. This results in a crash
The typical use case is an object that is contructed in Lua but
ownership has to be passed on to C++, because the object needs to be
stored there for whatever reason. The scripts can usually be edited by a
broader team and the application crashing because someone over there
makes a mistake is not really an option, because it leaves them
clueless. Most likely you want to report the error instead. Of course
you could circumvent this issue with creator methods, but still the
straight forward approach should work in all cases, I think.
It seems that this is a bug in luabind, so I patched it for me. In case
you are interested and also for future reference, here is the fix I
pushed to github:
Get latest updates about Open Source Projects, Conferences and News.