mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[gnc-report.cpp] Refinement to 1da2464577
-- *errmsg must be assigned
Callers to this function expect that either *data or *errmsg are assigned a newly allocated char, to be g_freed later.
This commit is contained in:
parent
cac01aae65
commit
5bcf979f0b
@ -227,18 +227,12 @@ gnc_run_report_with_error_handling (gint report_id, gchar ** data, gchar **errms
|
||||
*errmsg = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
else if (scm_is_string (captured_error))
|
||||
{
|
||||
*errmsg = gnc_scm_to_utf8_string (captured_error);
|
||||
*data = NULL;
|
||||
PWARN ("Error in report: %s", *errmsg);
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
*errmsg = scm_is_string (captured_error) ? gnc_scm_to_utf8_string (captured_error) :
|
||||
g_strdup ("");
|
||||
*data = nullptr;
|
||||
PWARN("Report %s Failed to generate html but didn't raise a Scheme exception.",
|
||||
gnc_report_name (report));
|
||||
PWARN ("Error in report: %s", *errmsg);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user