lua-users home
lua-l archive

Re: Userdata and methods

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Philip Bock wrote:
> 
> if ((lua_gettop(client_state) >= 5) && lua_isuserdata(client_state, 1))
> {
> Viewport *this_viewport = (Viewport *) lua_touserdata(client_state, 1);
> 
> The program gives a segmentation fault at the first attempt to access
> this_viewport after it is initialized. Anyone have any ideas? I'm new to
> Lua, so it's probably just a stupid mistake. Thanks, Philip Bock.
Hmm... looks sane. Are you sure, your lua_pushusertag is correct? Or that
you get the right userdata object (you don't check the tag)?
Ciao, ET.

AltStyle によって変換されたページ (->オリジナル) /