aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog5
-rw-r--r--calendar/gui/migration.c13
2 files changed, 15 insertions, 3 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index c31f1af71f..d90a7e5920 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,8 @@
+2005-02-15 Rodrigo Moya <rodrigo@novell.com>
+
+ * gui/migration.c (migrate_ical_folder_to_source): check return value
+ from e_cal_new, to display a better warning message.
+
2005-02-11 Rodrigo Moya <rodrigo@novell.com>
Fixes #72038
diff --git a/calendar/gui/migration.c b/calendar/gui/migration.c
index 76b8a52a16..fb8f0b2f8c 100644
--- a/calendar/gui/migration.c
+++ b/calendar/gui/migration.c
@@ -318,14 +318,20 @@ migrate_ical_folder_to_source (char *old_path, ESource *new_source, ECalSourceTy
dialog_set_folder_name (e_source_peek_name (new_source));
- old_ecal = e_cal_new (old_source, type);
+ if (!(old_ecal = e_cal_new (old_source, type))) {
+ g_warning ("could not find a backend for '%s'", e_source_get_uri (old_source));
+ goto finish;
+ }
if (!e_cal_open (old_ecal, TRUE, &error)) {
g_warning ("failed to load source ecal for migration: '%s' (%s)", error->message,
e_source_get_uri (old_source));
goto finish;
}
- new_ecal = e_cal_new (new_source, type);
+ if (!(new_ecal = e_cal_new (new_source, type))) {
+ g_warning ("could not find a backend for '%s'", e_source_get_uri (new_source));
+ goto finish;
+ }
if (!e_cal_open (new_ecal, FALSE, &error)) {
g_warning ("failed to load destination ecal for migration: '%s' (%s)", error->message,
e_source_get_uri (new_source));
@@ -336,7 +342,8 @@ migrate_ical_folder_to_source (char *old_path, ESource *new_source, ECalSourceTy
finish:
g_clear_error (&error);
- g_object_unref (old_ecal);
+ if (old_ecal)
+ g_object_unref (old_ecal);
g_object_unref (group);
if (new_ecal)
g_object_unref (new_ecal);