summaryrefslogtreecommitdiff
path: root/src/base/stats/text.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/stats/text.cc')
-rw-r--r--src/base/stats/text.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/base/stats/text.cc b/src/base/stats/text.cc
index f8471f1a1..683ba7fe4 100644
--- a/src/base/stats/text.cc
+++ b/src/base/stats/text.cc
@@ -674,7 +674,11 @@ initText(const string &filename, bool desc)
static bool connected = false;
if (!connected) {
- text.open(*simout.find(filename));
+ ostream *os = simout.find(filename);
+ if (!os)
+ os = simout.create(filename);
+
+ text.open(*os);
text.descriptions = desc;
connected = true;
}