1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-24 03:46:39 +02:00

Fixed but when no parameter given for /perl and /python options

This commit is contained in:
Sebastien Helleu
2005-10-16 15:39:20 +00:00
parent 5a3976d6a5
commit 7bb815a540
4 changed files with 44 additions and 8 deletions
+11 -2
View File
@@ -670,7 +670,13 @@ weechat_python_cmd (t_weechat_plugin *plugin,
(void) handler_args;
(void) handler_pointer;
argv = plugin->explode_string (plugin, arguments, " ", 0, &argc);
if (arguments)
argv = plugin->explode_string (plugin, arguments, " ", 0, &argc);
else
{
argv = NULL;
argc = 0;
}
switch (argc)
{
@@ -783,7 +789,10 @@ weechat_python_cmd (t_weechat_plugin *plugin,
plugin->printf_server (plugin,
"Python error: wrong argument count for \"python\" command");
}
plugin->free_exploded_string (plugin, argv);
if (argv)
plugin->free_exploded_string (plugin, argv);
return 1;
}