From 8bb4777789dca4935d5cf044dca36678d4a880d1 Mon Sep 17 00:00:00 2001 From: Cary R Date: Sun, 14 Aug 2016 17:25:12 -0700 Subject: [PATCH] Fix getting timeunit outside of module to use a defined check value --- pform.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pform.cc b/pform.cc index be8972afb..e1ce254c0 100644 --- a/pform.cc +++ b/pform.cc @@ -1096,10 +1096,10 @@ void pform_set_timeunit(const char*txt, bool in_module, bool only_check) int pform_get_timeunit() { - if (pform_cur_module.front()) - return pform_cur_module.front()->time_unit; - else + if (pform_cur_module.empty()) return pform_time_unit; + else + return pform_cur_module.front()->time_unit; } void pform_set_timeprecision(const char*txt, bool in_module, bool only_check)