Minor bugfix: Guard against NULL pointer in sprintf argument.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22820 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2013-03-02 13:49:06 +00:00
parent d311e942f6
commit 82837dbf63

View File

@ -542,6 +542,8 @@ gnc_ab_trans_dialog_verify_values(GncABTransDialog *td)
if (!localBIC || !localIBAN
|| (strlen(localBIC) == 0) || (strlen(localIBAN) == 0))
{
const char* localBankCode = AB_Transaction_GetLocalBankCode(td->ab_trans);
const char* localAccountCode = AB_Transaction_GetLocalAccountNumber(td->ab_trans);
values_ok = FALSE;
gnc_error_dialog(td->dialog,
_("Your local bank account does not yet have the SEPA account information stored. "
@ -549,8 +551,8 @@ gnc_ab_trans_dialog_verify_values(GncABTransDialog *td)
"which has not yet been implemented directly in gnucash. "
"Please execute the command line program \"aqhbci-tool\" for your account, as follows: "
"aqhbci-tool4 getaccsepa -b %s -a %s"),
AB_Transaction_GetLocalBankCode(td->ab_trans),
AB_Transaction_GetLocalAccountNumber(td->ab_trans));
(localBankCode ? localBankCode : ""),
(localAccountCode ? localAccountCode : ""));
}
}