From c7553c75aa2b11b42df7031773dd6326c4a98272 Mon Sep 17 00:00:00 2001 From: Iain Holmes Date: Tue, 3 Jul 2001 16:18:57 +0000 Subject: Fix crashes if the offline button is clicked before the summary has been created svn path=/trunk/; revision=10750 --- my-evolution/ChangeLog | 6 ++++++ my-evolution/e-summary.c | 12 ++++++++++++ 2 files changed, 18 insertions(+) (limited to 'my-evolution') diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog index 4b3bd0c870..fae5f529b6 100644 --- a/my-evolution/ChangeLog +++ b/my-evolution/ChangeLog @@ -1,3 +1,9 @@ +2001-07-03 Iain Holmes + + * e-summary.c (e_summary_set_online): Return if summary == NULL. + (e_summary_add_connections): Return NULL if summary == NULL. + (e_summary_count_connections): Return 0 if summary == NULL. + 2001-07-02 Iain Holmes * e-summary-tasks.[ch]: New files for tasks. diff --git a/my-evolution/e-summary.c b/my-evolution/e-summary.c index 1af0b1edac..833073c94c 100644 --- a/my-evolution/e-summary.c +++ b/my-evolution/e-summary.c @@ -589,6 +589,10 @@ e_summary_count_connections (ESummary *summary) GList *p; int count = 0; + if (summary == NULL) { + return 0; + } + for (p = summary->priv->connections; p; p = p->next) { ESummaryConnection *c; @@ -605,6 +609,10 @@ e_summary_add_connections (ESummary *summary) GList *p; GList *connections = NULL; + if (summary == NULL) { + return NULL; + } + for (p = summary->priv->connections; p; p = p->next) { ESummaryConnection *c; GList *r; @@ -626,6 +634,10 @@ e_summary_set_online (ESummary *summary, { GList *p; + if (summary == NULL) { + return; + } + for (p = summary->priv->connections; p; p = p->next) { ESummaryConnection *c; -- cgit v1.2.3