1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-27 01:25:34 +00:00

Bug 957: if_assert_failed in ecmascript_put_interpreter.

[ Forward ported from commit 566039624f
  in ELinks 0.11.3.GIT.  --KON ]
This commit is contained in:
Kalle Olavi Niemitalo 2007-07-02 21:43:30 +03:00 committed by Kalle Olavi Niemitalo
parent c1e89ee375
commit 1ea44dcda5

View File

@ -141,6 +141,10 @@ ecmascript_put_interpreter(struct ecmascript_interpreter *interpreter)
{
assert(interpreter);
assert(interpreter->backend_nesting == 0);
/* If the assertion fails, it is better to leak the
* interpreter than to corrupt memory. */
if_assert_failed return;
#ifdef CONFIG_ECMASCRIPT_SEE
see_put_interpreter(interpreter);
#else