summaryrefslogtreecommitdiff
path: root/src/plugins/exec/exec-command.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2014-03-11 20:13:28 +0100
committerSebastien Helleu <flashcode@flashtux.org>2014-03-11 20:13:28 +0100
commitd5e1a52e24a9a43492820a196074884bea8a24cd (patch)
treee0cd313abb3a1c93d0eec19895c9575e0fbe2d7a /src/plugins/exec/exec-command.c
parent2dc6eeaee29ee42fa89dfb6282e1217abcb5e527 (diff)
downloadweechat-d5e1a52e24a9a43492820a196074884bea8a24cd.zip
exec: fix crash when giving bad id to command /exec -in
Diffstat (limited to 'src/plugins/exec/exec-command.c')
-rw-r--r--src/plugins/exec/exec-command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/exec/exec-command.c b/src/plugins/exec/exec-command.c
index a706c3d63..e576be871 100644
--- a/src/plugins/exec/exec-command.c
+++ b/src/plugins/exec/exec-command.c
@@ -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);