From dc56f8bca94ef480d90315c3150bb7cb83bfc70e Mon Sep 17 00:00:00 2001
From: Danny Auble <da@schedmd.com>
Date: Mon, 9 Sep 2013 09:24:30 -0700
Subject: [PATCH] Check to make sure we have assoc_cond before going into
 clause.

---
 src/plugins/accounting_storage/mysql/as_mysql_acct.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/accounting_storage/mysql/as_mysql_acct.c b/src/plugins/accounting_storage/mysql/as_mysql_acct.c
index e90b8965fe1..6d188e742dc 100644
--- a/src/plugins/accounting_storage/mysql/as_mysql_acct.c
+++ b/src/plugins/accounting_storage/mysql/as_mysql_acct.c
@@ -667,7 +667,7 @@ empty:
 
 	acct_list = list_create(slurmdb_destroy_account_rec);
 
-	if (acct_cond && acct_cond->with_assocs) {
+	if (acct_cond && acct_cond->with_assocs && acct_cond->assoc_cond) {
 		/* We are going to be freeing the inners of
 		   this list in the acct->name so we don't
 		   free it here
-- 
GitLab