aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/migration.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/migration.c')
-rw-r--r--calendar/gui/migration.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/calendar/gui/migration.c b/calendar/gui/migration.c
index 65c759ce40..8a95bc3a6a 100644
--- a/calendar/gui/migration.c
+++ b/calendar/gui/migration.c
@@ -466,7 +466,12 @@ create_calendar_sources (CalendarComponent *component,
GSList *s;
for (s = sources; s; s = s->next) {
ESource *source = E_SOURCE (s->data);
- if (!strcmp (PERSONAL_RELATIVE_URI, e_source_peek_relative_uri (source))) {
+ const gchar *relative_uri;
+
+ relative_uri = e_source_peek_relative_uri (source);
+ if (relative_uri == NULL)
+ continue;
+ if (!strcmp (PERSONAL_RELATIVE_URI, relative_uri)) {
*personal_source = g_object_ref (source);
break;
}
@@ -562,7 +567,12 @@ create_task_sources (TasksComponent *component,
GSList *s;
for (s = sources; s; s = s->next) {
ESource *source = E_SOURCE (s->data);
- if (!strcmp (PERSONAL_RELATIVE_URI, e_source_peek_relative_uri (source))) {
+ const gchar *relative_uri;
+
+ relative_uri = e_source_peek_relative_uri (source);
+ if (relative_uri == NULL)
+ continue;
+ if (!strcmp (PERSONAL_RELATIVE_URI, relative_uri)) {
*personal_source = g_object_ref (source);
break;
}
@@ -1070,7 +1080,12 @@ create_memo_sources (MemosComponent *component,
GSList *s;
for (s = sources; s; s = s->next) {
ESource *source = E_SOURCE (s->data);
- if (!strcmp (PERSONAL_RELATIVE_URI, e_source_peek_relative_uri (source))) {
+ const gchar *relative_uri;
+
+ relative_uri = e_source_peek_relative_uri (source);
+ if (relative_uri == NULL)
+ continue;
+ if (!strcmp (PERSONAL_RELATIVE_URI, relative_uri)) {
*personal_source = g_object_ref (source);
break;
}