diff --git a/ChangeLog b/ChangeLog index 9c4e57443..14d3fd028 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,6 +24,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] * core: display a warning in case of inconsistency between the options weechat.look.save_{config|layout}_on_exit * api: add integer return code for functions hook_{signal|hsignal}_send +* guile: fix module used after unload of a script * lua: fix interpreter used after unload of a script * perl: fix context used after unload of a script * python: fix interpreter used after unload of a script 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)