From fb2f55460fe5ccae4767465f74b0e09c9f2283e0 Mon Sep 17 00:00:00 2001 From: Derek Atkins Date: Tue, 9 Sep 2003 23:23:09 +0000 Subject: [PATCH] * src/gnome-utils/dialog-transfer.c: during the dialog startup it tries to build the transfer rate. This crashes on Solaris because during startup one commodity is still NULL when it tries to print it. Fixes bug #121677 git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9271 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 8 ++++++++ src/gnome-utils/dialog-transfer.c | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index e8625a63c2..7179580e49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2003-09-09 Derek Atkins + + * src/gnome-utils/dialog-transfer.c: during the dialog startup it + tries to build the transfer rate. This crashes on Solaris because + during startup one commodity is still NULL when it tries to print + it. + Fixes bug #121677 + 2003-09-04 Derek Atkins Apply Nigel Titley's patch to fix #103174: diff --git a/src/gnome-utils/dialog-transfer.c b/src/gnome-utils/dialog-transfer.c index ef55875eea..8305308175 100644 --- a/src/gnome-utils/dialog-transfer.c +++ b/src/gnome-utils/dialog-transfer.c @@ -838,6 +838,14 @@ gnc_xfer_dialog_update_conv_info (XferDialog *xferData) from_mnemonic = gnc_commodity_get_mnemonic(xferData->from_commodity); to_mnemonic = gnc_commodity_get_mnemonic(xferData->to_commodity); + /* On the theory that if we don't have a mnemonic then we don't + * have a commodity... On Solaris this crashes without a string. + * So, just leave now and wait for the second initialization to + * occur. + */ + if (!from_mnemonic || !to_mnemonic) + return; + // price = gnc_amount_edit_get_amount(GNC_AMOUNT_EDIT(xferData->price_edit)); price = gnc_xfer_dialog_compute_price(xferData);