diff --git a/src/ecmascript/spidermonkey/heartbeat.c b/src/ecmascript/spidermonkey/heartbeat.c index 242fc794..f71206a0 100644 --- a/src/ecmascript/spidermonkey/heartbeat.c +++ b/src/ecmascript/spidermonkey/heartbeat.c @@ -111,6 +111,7 @@ add_heartbeat(struct ecmascript_interpreter *interpreter) void done_heartbeat(struct heartbeat *hb) { + if (!hb) return; /* add_heartbeat returned NULL */ assert(hb->interpreter); /* Stop the heartbeat timer if this heartbeat is the only one. */