summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/system.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sim/system.cc b/src/sim/system.cc
index 40f5ea0ce..815a4cf1c 100644
--- a/src/sim/system.cc
+++ b/src/sim/system.cc
@@ -410,10 +410,11 @@ System::getMasterId(std::string master_name)
}
}
- // todo: Check if stats are enabled yet
- // I just don't know a good way to do it
+ // Verify that the statistics haven't been enabled yet
+ // Otherwise objects will have sized their stat buckets and
+ // they will be too small
- if (false)
+ if (Stats::enabled())
fatal("Can't request a masterId after regStats(). \
You must do so in init().\n");