Object reference error on terminal

Opening options dialog would generate the following error on the
terminal, g_object_ref: assertion 'G_IS_OBJECT (object)' failed which
was traced back to GncOptionDateUIItem trying to use a null pointer to
reference the GtkUIItem.
This commit is contained in:
Robert Fewell 2022-04-13 16:32:59 +01:00
parent 6d390dc6b4
commit 3fcaaef657

View File

@ -1365,7 +1365,7 @@ class GncOptionDateUIItem : public GncOptionGtkUIItem
{
public:
GncOptionDateUIItem(GncDateEntryPtr entry, GncOptionUIType type) :
GncOptionGtkUIItem{nullptr, type}, m_entry{std::move(entry)} { }
GncOptionGtkUIItem{entry->get_widget(), type}, m_entry{std::move(entry)} { }
~GncOptionDateUIItem() = default;
void clear_ui_item() override { m_entry = nullptr; }
void set_ui_item_from_option(GncOption& option) noexcept override