[node] throw if a render is already pending, fixes #2247

This commit is contained in:
Mike Morris
2015-09-15 13:27:45 -04:00
parent a3ea4acb7c
commit a101ab4cf5
2 changed files with 6 additions and 6 deletions

View File

@@ -186,6 +186,10 @@ NAN_METHOD(NodeMap::Render) {
return Nan::ThrowTypeError("Style is not loaded");
}
if (nodeMap->callback) {
return Nan::ThrowError("Map is currently rendering an image");
}
auto options = ParseOptions(info[0]->ToObject());
assert(!nodeMap->callback);