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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user