mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix crash in gnc_owner_get_owner
If there are no owners gnc_general_search_get_selected returns nullptr without showing the dialog.
This commit is contained in:
parent
03bca6023c
commit
fc41a51f57
@ -285,6 +285,9 @@ void gnc_owner_get_owner (GtkWidget *widget, GncOwner *owner)
|
||||
QofInstance *instance =
|
||||
gnc_general_search_get_selected (GNC_GENERAL_SEARCH (widget));
|
||||
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (owner->type == GNC_OWNER_NONE ||
|
||||
g_strcmp0(instance->e_type, qofOwnerGetType(owner)) == 0)
|
||||
qofOwnerSetEntity(owner, instance);
|
||||
|
Loading…
Reference in New Issue
Block a user