From 12803e4075dc71efe44fdd24260a5b94c87770d4 Mon Sep 17 00:00:00 2001 From: witekfl Date: Sun, 4 Mar 2012 18:20:48 +0100 Subject: [PATCH] Check if hb is NULL. --- src/ecmascript/spidermonkey/heartbeat.c | 1 + 1 file changed, 1 insertion(+) 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. */