mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-26 02:40:43 -06:00
Bug 797924 - Crash when searching for customer to process payment.
get_guid->param_getfcn() can apparently return NULL, so we must check before dereferencing it to copy its value.
This commit is contained in:
parent
65c0e3c914
commit
029f3283e7
@ -510,8 +510,9 @@ gnc_general_search_set_selected (GNCGeneralSearch *gsl, gpointer selection)
|
||||
if (selection && priv->get_guid)
|
||||
{
|
||||
const QofParam *get_guid = priv->get_guid;
|
||||
priv->guid = * ((GncGUID *)(get_guid->param_getfcn
|
||||
(gsl->selected_item, get_guid)));
|
||||
GncGUID *guid = (GncGUID *)(get_guid->param_getfcn (gsl->selected_item,
|
||||
get_guid));
|
||||
priv->guid = guid ? *guid : *guid_null ();
|
||||
gnc_gui_component_watch_entity
|
||||
(priv->component_id, &(priv->guid),
|
||||
QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
|
||||
|
Loading…
Reference in New Issue
Block a user