summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-08-27 17:19:01 +0200
committerSébastien Helleu <flashcode@flashtux.org>2023-08-27 17:19:01 +0200
commit711d3afa5c2d6c367a5f05886f8bde566698b3dd (patch)
tree87374cde27cb8d76f013eb16a80118f63e60b41b /src/plugins
parent99822fc5e7d1c1aa01f82d4a38b61b8a03ea4fc3 (diff)
downloadweechat-711d3afa5c2d6c367a5f05886f8bde566698b3dd.zip
script: fix crash when a `/script` command triggers another `/script` command (issue #923)
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/script/script-action.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/script/script-action.c b/src/plugins/script/script-action.c
index eae0e63d3..7de928e3a 100644
--- a/src/plugins/script/script-action.c
+++ b/src/plugins/script/script-action.c
@@ -1300,6 +1300,9 @@ script_action_run_all ()
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
0, &num_actions);
+
+ script_action_clear ();
+
if (actions)
{
for (i = 0; i < num_actions; i++)
@@ -1564,8 +1567,6 @@ script_action_run_all ()
weechat_string_free_split (actions);
}
- script_action_clear ();
-
return 1;
}