diff --git a/src/lib-sieve/sieve-validator.c b/src/lib-sieve/sieve-validator.c
index d8b50539f17c8c94a23c664af8b24fdd8441bfd0..2bd49741ea9e79e9f18496bde5db9b35d8dd84fd 100644
--- a/src/lib-sieve/sieve-validator.c
+++ b/src/lib-sieve/sieve-validator.c
@@ -766,6 +766,15 @@ bool sieve_validate_tag_parameter
 	struct sieve_ast_argument *tag, struct sieve_ast_argument *param,
 	enum sieve_ast_argument_type req_type)
 {
+	if ( param == NULL ) {
+		sieve_argument_validate_error(validator, tag, 
+			"the :%s tag for the %s %s requires %s as parameter, "
+			"but no more arguments were found", sieve_ast_argument_tag(tag), 
+			cmd->command->identifier, sieve_command_type_name(cmd->command),
+			sieve_ast_argument_type_name(req_type));
+		return FALSE;	
+	}
+
 	if ( sieve_ast_argument_type(param) != req_type && 
 		(sieve_ast_argument_type(param) != SAAT_STRING || 
 			req_type != SAAT_STRING_LIST) )