summaryrefslogtreecommitdiff
path: root/src/plugins/guile/weechat-guile.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2014-02-17 22:01:14 +0100
committerSebastien Helleu <flashcode@flashtux.org>2014-02-17 22:01:14 +0100
commit7b37bf701ebd629246b8cbee9d7021657101e5d5 (patch)
tree323b6c58e5ea4904b6292b848b9d8bd592c49feb /src/plugins/guile/weechat-guile.c
parentbe159f42a847d3d21d0bd716c25f035f9b36b736 (diff)
downloadweechat-7b37bf701ebd629246b8cbee9d7021657101e5d5.zip
guile: fix module used after unload of a script
Diffstat (limited to 'src/plugins/guile/weechat-guile.c')
-rw-r--r--src/plugins/guile/weechat-guile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/guile/weechat-guile.c b/src/plugins/guile/weechat-guile.c
index 371b840e5..221b288b5 100644
--- a/src/plugins/guile/weechat-guile.c
+++ b/src/plugins/guile/weechat-guile.c
@@ -495,6 +495,9 @@ weechat_guile_unload (struct t_plugin_script *script)
if (interpreter)
weechat_guile_catch (scm_gc_unprotect_object, interpreter);
+ if (guile_current_script)
+ scm_set_current_module ((SCM)(guile_current_script->interpreter));
+
(void) weechat_hook_signal_send ("guile_script_unloaded",
WEECHAT_HOOK_SIGNAL_STRING, filename);
if (filename)