diff --git a/src/plugins/burst_buffer/cray/burst_buffer_cray.c b/src/plugins/burst_buffer/cray/burst_buffer_cray.c
index 839cb93c986ffcf2a564edcf7a475e5b5d36916e..6a125976928acf4935c03047eb21e703435c6d7f 100644
--- a/src/plugins/burst_buffer/cray/burst_buffer_cray.c
+++ b/src/plugins/burst_buffer/cray/burst_buffer_cray.c
@@ -940,8 +940,10 @@ static void _set_assoc_mgr_ptrs(bb_alloc_t *bb_alloc)
 				    &bb_alloc->assoc_ptr,
 				    true) == SLURM_SUCCESS) {
 		xfree(bb_alloc->assocs);
-		bb_alloc->assocs =
-			xstrdup_printf(",%u,", bb_alloc->assoc_ptr->id);
+		if (bb_alloc->assoc_ptr) {
+			bb_alloc->assocs =
+				xstrdup_printf(",%u,", bb_alloc->assoc_ptr->id);
+		}
 	}
 
 	memset(&qos_rec, 0, sizeof(slurmdb_qos_rec_t));