summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/node/src/node_map.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/node/src/node_map.cpp b/platform/node/src/node_map.cpp
index 9b76f0f542..521cca1a51 100644
--- a/platform/node/src/node_map.cpp
+++ b/platform/node/src/node_map.cpp
@@ -447,6 +447,12 @@ void NodeMap::startRender(NodeMap::RenderOptions options) {
}
void NodeMap::renderFinished() {
+ if (!callback) {
+ // In some situations, the render finishes at the same time as we call cancel. Make sure
+ // we are only finishing a render once.
+ return;
+ }
+
Nan::HandleScope scope;
// We're done with this render call, so we're unrefing so that the loop could close.