1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 05:16:38 +02:00

exec: fix crash when giving bad id to command /exec -in

This commit is contained in:
Sebastien Helleu
2014-03-11 20:13:28 +01:00
parent 2dc6eeaee2
commit d5e1a52e24
+1 -1
View File
@@ -198,7 +198,7 @@ exec_command_exec (void *data, struct t_gui_buffer *buffer, int argc,
if (argc < 4)
return WEECHAT_RC_ERROR;
ptr_exec_cmd = exec_command_search_running_id (argv[2]);
if (ptr_exec_cmd->hook)
if (ptr_exec_cmd && ptr_exec_cmd->hook)
{
length = strlen (argv_eol[3]) + 1 + 1;
text = malloc (length);