mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Correct memory handling of scm_to_locale_string per guile manual
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20757 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -36,7 +36,15 @@ gfec_catcher(void *data, SCM tag, SCM throw_args)
|
||||
{
|
||||
result = scm_call_2(func, tag, throw_args);
|
||||
if (scm_is_string(result))
|
||||
msg = scm_to_locale_string(result);
|
||||
{
|
||||
char * str;
|
||||
|
||||
scm_dynwind_begin (0);
|
||||
str = scm_to_locale_string (result);
|
||||
msg = g_strdup (str);
|
||||
scm_dynwind_free (str);
|
||||
scm_dynwind_end ();
|
||||
}
|
||||
}
|
||||
|
||||
if (msg == NULL)
|
||||
|
||||
Reference in New Issue
Block a user