mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[gnucash-commands.cpp] fix guile error handling
* id is an SCM object which is never NULL, but may be #f to signal error.
This commit is contained in:
parent
be96f3bf68
commit
9d28edb332
@ -215,13 +215,16 @@ scm_run_report (void *data,
|
||||
|
||||
if (!args->export_type.empty())
|
||||
{
|
||||
scm_call_3(run_export_cmd, report, type, file);
|
||||
SCM retval = scm_call_3(run_export_cmd, report, type, file);
|
||||
|
||||
if (scm_is_false (retval))
|
||||
scm_cleanup_and_exit_with_failure (nullptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
SCM id = scm_call_1(get_report_cmd, report);
|
||||
|
||||
if (!id)
|
||||
if (scm_is_false (id))
|
||||
scm_cleanup_and_exit_with_failure (nullptr);
|
||||
char* html;
|
||||
gnc_run_report (scm_to_int(id), &html);
|
||||
|
Loading…
Reference in New Issue
Block a user