check for null
authorArt Cancro <ajc@uncensored.citadel.org>
Fri, 2 Mar 2012 17:05:20 +0000 (12:05 -0500)
committerArt Cancro <ajc@uncensored.citadel.org>
Fri, 2 Mar 2012 17:05:20 +0000 (12:05 -0500)
citadel/modules/sieve/serv_sieve.c

index 71e7f753261d2df122ee03318866d38f080669fc..edc3a166a1fd4bc01d7e147da5027252d705b5dc 100644 (file)
@@ -893,7 +893,10 @@ void sieve_do_room(char *roomname) {
         * Check to see whether the script is empty and should not be processed.
         * A script is considered non-empty if it contains at least one semicolon.
         */
-       if ((strchr(get_active_script(&u), ';') == NULL)) {
+       if (
+               (get_active_script(&u) == NULL)
+               || (strchr(get_active_script(&u), ';') == NULL)
+       ) {
                syslog(LOG_DEBUG, "Sieve script is empty.  No processing is required.");
                return;
        }