diff --git a/modules/Bio/EnsEMBL/Hive/AnalysisStats.pm b/modules/Bio/EnsEMBL/Hive/AnalysisStats.pm
index 8dc20ba395e79cf96d2af98affc51c5da8278ae1..edc85fc29d6086fe47220e63131f8e574481eb6c 100755
--- a/modules/Bio/EnsEMBL/Hive/AnalysisStats.pm
+++ b/modules/Bio/EnsEMBL/Hive/AnalysisStats.pm
@@ -141,6 +141,7 @@ sub determine_status {
 sub print_stats {
   my $self = shift;
 
+  return unless($self->get_analysis);
   #printf("STATS %20s(%3d) %11s  jobs(%7d:t,%7d:q,%7d:d) %5d:batchsize %5d:hiveCapacity %5d:neededWorkers (synched %d secs ago)\n",
   printf("STATS %20s(%3d) %12s jobs(t=%d,q=%d,d=%d,f=%d) batchsize=%d hiveCapacity=%d neededWorkers=%d (synched %d secs ago)\n",
         $self->get_analysis->logic_name,