diff --git a/src/node_map.cpp b/src/node_map.cpp index e3acbeea7..2dd46e549 100644 --- a/src/node_map.cpp +++ b/src/node_map.cpp @@ -287,12 +287,13 @@ void NodeMap::renderFinished() { // Instance NodeMap::NodeMap(v8::Handle source_) : - source(source_), view(sharedDisplay()), fs(*ObjectWrap::Unwrap(source_)), map(view, fs, mbgl::Map::RenderMode::Still), async(new uv_async_t) { + NanAssignPersistent(source, source_); + async->data = this; uv_async_init(uv_default_loop(), async, [](uv_async_t *as, int) { reinterpret_cast(as->data)->renderFinished();