From 280fa288bc991b27f9e7c809598543a57385acf7 Mon Sep 17 00:00:00 2001
From: Per Cederqvist <ceder@lysator.liu.se>
Date: Tue, 11 Jun 1991 05:43:28 +0000
Subject: [PATCH] Now handles the case when a recipient to a text has been
 deleted.

---
 src/server/text-garb.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/src/server/text-garb.c b/src/server/text-garb.c
index 113ed41af..48e1c3858 100644
--- a/src/server/text-garb.c
+++ b/src/server/text-garb.c
@@ -75,17 +75,24 @@ garb_text(void)
 	switch ( misc->type )
 	{
 	case recpt:
-	    limit = 24 * 3600 * cached_get_garb_nice( misc->datum.recipient );
-	    if ( age < limit )
-		return FALSE;
-		
+	    if ( cached_conf_exists( misc->datum.recipient ) )
+	    {
+		limit = (24 * 3600 *
+			 cached_get_garb_nice( misc->datum.recipient ));
+		if ( age < limit )	
+		    return FALSE;
+	    }
+
 	    break;
 
 	case cc_recpt:
-	    limit = ( 24 * 3600
-		     * cached_get_garb_nice( misc->datum.cc_recipient ));
-	    if ( age < limit )
-		return FALSE;
+	    if ( cached_conf_exists( misc->datum.cc_recipient ))
+	    {
+		limit = ( 24 * 3600
+			 * cached_get_garb_nice( misc->datum.cc_recipient ));
+		if ( age < limit )
+		    return FALSE;
+	    }
 
 	    break;
 
-- 
GitLab