os: sanity check in Reporter::Xml_generator

With this check in place, one can safely construct an 'Xml_generator'
even if the report is disabled. This relieves the user of the reporter
from the need to distinguish enabled from disabled reports.
This commit is contained in:
Norman Feske 2017-03-02 12:24:26 +01:00 committed by Christian Helmuth
parent 50ee91e738
commit 39e409f756

View File

@ -146,7 +146,8 @@ class Genode::Reporter : Noncopyable
reporter._xml_name.string(),
func)
{
reporter._conn->report.submit(used());
if (reporter.enabled())
reporter._conn->report.submit(used());
}
};
};