diff -r 5cb795d0d1de src/lib-sieve/plugins/imap4flags/tag-flags.c
--- a/src/lib-sieve/plugins/imap4flags/tag-flags.c	Tue Sep 28 22:50:04 2010 +0200
+++ b/src/lib-sieve/plugins/imap4flags/tag-flags.c	Wed Sep 29 19:09:06 2010 +0200
@@ -340,7 +340,8 @@
 	const struct sieve_side_effect *new_seffect, 	
 	void **old_context)
 {
-	*old_context = new_seffect->context;
+	if ( new_seffect != NULL )
+		*old_context = new_seffect->context;
 	
 	return 1;
 }