summaryrefslogtreecommitdiff
path: root/src/emacs-module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emacs-module.c')
-rw-r--r--src/emacs-module.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c
index ba996982604..7e0ba3c16c1 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -328,7 +328,10 @@ module_free_global_ref (emacs_env *env, emacs_value ref)
set_hash_value_slot (h, i, value);
}
else
- hash_remove_from_table (h, obj);
+ {
+ eassert (refcount == 0);
+ hash_remove_from_table (h, obj);
+ }
}
if (module_assertions)