mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-04 11:10:27 +02:00
Fix a bug in after-gc Scheme hook
* libguile/gc.c (scm_gc_event_listener_restarting_mutators): Avoid running hook before Guile is booted.
This commit is contained in:
parent
7b4f4427f8
commit
0a6767b3b9
1 changed files with 3 additions and 1 deletions
|
@ -41,6 +41,7 @@
|
|||
#include "gsubr.h"
|
||||
#include "hashtab.h"
|
||||
#include "hooks.h"
|
||||
#include "init.h"
|
||||
#include "list.h"
|
||||
#include "modules.h"
|
||||
#include "numbers.h"
|
||||
|
@ -194,7 +195,8 @@ scm_gc_event_listener_restarting_mutators (void *data)
|
|||
/* If there are Scheme hooks and we have a current Guile thread,
|
||||
enqueue those to be run on the current thread. */
|
||||
scm_thread *t = SCM_I_CURRENT_THREAD;
|
||||
if (t && scm_is_false (SCM_CDR (after_gc_async_cell)) &&
|
||||
if (t && scm_initialized_p &&
|
||||
scm_is_false (SCM_CDR (after_gc_async_cell)) &&
|
||||
scm_is_false (scm_hook_empty_p (scm_after_gc_hook)))
|
||||
{
|
||||
SCM_SETCDR (after_gc_async_cell, t->pending_asyncs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue