edit-calendar-page: Check calendar before setting name while disposing
The calendar is not initialized when opening and closing the calendar management dialog. Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/638>
This commit is contained in:
@@ -319,7 +319,8 @@ gcal_edit_calendar_page_dispose (GObject *object)
|
|||||||
{
|
{
|
||||||
GcalEditCalendarPage *self = GCAL_EDIT_CALENDAR_PAGE (object);
|
GcalEditCalendarPage *self = GCAL_EDIT_CALENDAR_PAGE (object);
|
||||||
|
|
||||||
gcal_calendar_set_name (self->calendar, gtk_editable_get_text (GTK_EDITABLE (self->name_entry)));
|
if (self->calendar)
|
||||||
|
gcal_calendar_set_name (self->calendar, gtk_editable_get_text (GTK_EDITABLE (self->name_entry)));
|
||||||
|
|
||||||
G_OBJECT_CLASS (gcal_edit_calendar_page_parent_class)->dispose (object);
|
G_OBJECT_CLASS (gcal_edit_calendar_page_parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user