X-Git-Url: http://git.harvie.cz/?p=mirrors%2Flibpurple-core-answerscripts.git;a=blobdiff_plain;f=answerscripts.c;h=54b757631f7a0ac969bc6f604b8392746b650fd0;hp=25d6cd6465e6b22ce79b08be197dd126eed5ba1d;hb=d94bfdb410a902979226266c5f74b38c1c30380d;hpb=bc647306b3aa38c77a4eacb36bc479efc18d54ba diff --git a/answerscripts.c b/answerscripts.c index 25d6cd6..54b7576 100755 --- a/answerscripts.c +++ b/answerscripts.c @@ -117,6 +117,10 @@ static void received_im_msg_cb(PurpleAccount *account, char *who, char *buffer, //Launch job on background answerscripts_job *job = (answerscripts_job*) malloc(sizeof(answerscripts_job)); job->pipe = popen(hook_script, "r"); + if(job->pipe == NULL) { + fprintf(stderr,"Can't execute %s\n", hook_script); + return; + } job->conv = conv; #ifndef __WIN32__