From ea521f792ec66dcfa8c9272c60eb84f2b375a46d Mon Sep 17 00:00:00 2001 From: Hans Petter Jansson Date: Mon, 12 Jan 2004 07:46:38 +0000 Subject: Only update dialog widgets if they exist. 2004-01-12 Hans Petter Jansson * gui/dialogs/calendar-setup.c (source_to_dialog): Only update dialog widgets if they exist. svn path=/trunk/; revision=24169 --- calendar/ChangeLog | 5 +++++ calendar/gui/dialogs/calendar-setup.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 11af18d53d..d5a1b61eb3 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,8 @@ +2004-01-12 Hans Petter Jansson + + * gui/dialogs/calendar-setup.c (source_to_dialog): Only update dialog + widgets if they exist. + 2004-01-11 JP Rosevear * gui/tasks-component.c: Fix copyright notice, its copyright diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c index b310bada53..da2f2f0b40 100644 --- a/calendar/gui/dialogs/calendar-setup.c +++ b/calendar/gui/dialogs/calendar-setup.c @@ -299,8 +299,10 @@ source_to_dialog (SourceDialog *source_dialog) gtk_spin_button_set_value (GTK_SPIN_BUTTON (source_dialog->refresh_spin), refresh_str ? atoi (refresh_str) : 30); } else { - gtk_entry_set_text (GTK_ENTRY (source_dialog->uri_entry), ""); - gtk_spin_button_set_value (GTK_SPIN_BUTTON (source_dialog->refresh_spin), 30); + if (source_dialog->uri_entry) + gtk_entry_set_text (GTK_ENTRY (source_dialog->uri_entry), ""); + if (source_dialog->refresh_spin) + gtk_spin_button_set_value (GTK_SPIN_BUTTON (source_dialog->refresh_spin), 30); } g_signal_handlers_unblock_matched (source_dialog->name_entry, G_SIGNAL_MATCH_DATA, -- cgit v1.2.3