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:
John Ralls 2021-01-30 13:02:58 -08:00
parent 65c0e3c914
commit 029f3283e7

View File

@ -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);