From d822a62476a89fa0f1d5dbb67c4e70404f68d186 Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Fri, 20 Oct 2006 21:41:54 +0000 Subject: [PATCH] Fixed an error in the LogGroup system. --- Cantera/src/misc.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Cantera/src/misc.cpp b/Cantera/src/misc.cpp index e33b4fda0..010a7c06d 100755 --- a/Cantera/src/misc.cpp +++ b/Cantera/src/misc.cpp @@ -741,7 +741,7 @@ namespace Cantera { /// value". /// @ingroup HTML_logs void addLogEntry(string tag, string value) { - if (s_app->loglevel > 0) + if (s_app->loglevel > 0 && s_app->current) s_app->current->addChild("li",tag+": "+value); } @@ -749,7 +749,7 @@ namespace Cantera { /// value". /// @ingroup HTML_logs void addLogEntry(string tag, doublereal value) { - if (s_app->loglevel > 0) + if (s_app->loglevel > 0 && s_app->current) s_app->current->addChild("li",tag+": "+fp2str(value)); } @@ -757,14 +757,14 @@ namespace Cantera { /// value". /// @ingroup HTML_logs void addLogEntry(string tag, int value) { - if (s_app->loglevel > 0) + if (s_app->loglevel > 0 && s_app->current) s_app->current->addChild("li",tag+": "+int2str(value)); } /// Add an entry to the log file. /// @ingroup HTML_logs void addLogEntry(string msg) { - if (s_app->loglevel > 0) + if (s_app->loglevel > 0 && s_app->current) s_app->current->addChild("li",msg); } @@ -780,8 +780,8 @@ namespace Cantera { s_app->current = s_app->current->parent(); s_app->current = s_app->current->parent(); } + s_app->loglevel = s_app->loglevels.back(); s_app->loglevels.pop_back(); - s_app->loglevel = s_app->loglevels.back(); if (title != "" && title != s_app->loggroups.back()) { writelog("Logfile error." "\n beginLogGroup: "+ s_app->loggroups.back()+