creationix/node-sdl — pull request #21 by mntmn (2014-12-01 23:03:32+00:00)
Title: fixed crash when calling SDL.IMG.load

In node v0.10.29 I was doing something like:

var surface = SDL.IMG.load("./images/logo.png");

which always led to this crash:

node: /usr/include/nodejs/src/node_object_wrap.h:71: void node::ObjectWrap::Wrap(v8::Handle): Assertion `handle->InternalFieldCount() > 0' failed.

After modifying sdl::IMG::Load() to use the NEW_WRAPPED macro, I can successfully use images.