#! /bin/sh /usr/share/dpatch/dpatch-run
## 320-rad_account-replynull.dpatch by  <joe@nameserver3.ttec.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

@DPATCH@
diff -urNad freeradius-2.0.0~/src/main/acct.c freeradius-2.0.0/src/main/acct.c
--- freeradius-2.0.0~/src/main/acct.c	2006-01-24 20:51:05.000000000 -0500
+++ freeradius-2.0.0/src/main/acct.c	2006-01-24 22:35:24.000000000 -0500
@@ -152,7 +152,8 @@
 		 */
 		case RLM_MODULE_OK:
 		case RLM_MODULE_UPDATED:
-			request->reply->code = PW_ACCOUNTING_RESPONSE;
+			if (request->reply)
+				request->reply->code = PW_ACCOUNTING_RESPONSE;
 			break;
 		/*
 		 *	The module handled the request, don't reply.
