- TW-1309 memory error, if misconfigured calendar.details.report (thanks to
          Onion).
This commit is contained in:
Paul Beckingham 2014-04-23 08:02:43 -04:00
parent a2410bdba9
commit 45453de477
7 changed files with 11 additions and 0 deletions

View file

@ -331,7 +331,11 @@ int CmdCalendar::execute (std::string& output)
// Table with due date information
if (context.config.get ("calendar.details") == "full")
{
// Assert that 'report' is a valid report.
std::string report = context.config.get ("calendar.details.report");
if (context.commands.find (report) == context.commands.end ())
throw std::string (STRING_ERROR_DETAILS);
std::string report_filter = context.config.get ("report." + report + ".filter");
context.a3.clear ();