Fix segfault when running hierarchy assistant

When the dialog options properties page is part of the hierarchy
assistant, the top level window has changed and so can no longer get
the option_win pointer so test for this being null before trying to
update the sensitivity of the buttons.
This commit is contained in:
Robert Fewell 2022-04-18 13:27:33 +01:00
parent 0b67a91217
commit 91c7333aa2

View File

@ -214,7 +214,9 @@ dialog_changed_internal (GtkWidget *widget, bool sensitive)
auto option_win =
static_cast<GncOptionsDialog*>(g_object_get_data(G_OBJECT(toplevel),
"optionwin"));
option_win->set_sensitive(sensitive);
if (option_win) // this null when part of assistant
option_win->set_sensitive(sensitive);
}
void