[evolution] Bug #667741 - Crash when browse for CalDAV calendar
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug #667741 - Crash when browse for CalDAV calendar
- Date: Mon, 16 Jan 2012 18:26:06 +0000 (UTC)
commit 8b8f564a639cef32ecc6b85a34dfee77bfba79c5
Author: Milan Crha <mcrha redhat com>
Date: Mon Jan 16 19:25:37 2012 +0100
Bug #667741 - Crash when browse for CalDAV calendar
plugins/caldav/caldav-browse-server.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/plugins/caldav/caldav-browse-server.c b/plugins/caldav/caldav-browse-server.c
index e2cce51..e1384ce 100644
--- a/plugins/caldav/caldav-browse-server.c
+++ b/plugins/caldav/caldav-browse-server.c
@@ -1444,6 +1444,8 @@ init_dialog (GtkDialog *dialog,
}
soup_uri = soup_uri_new (url);
+ g_return_if_fail (soup_uri != NULL);
+
soup_uri_set_scheme (soup_uri, "caldav");
soup_uri_set_user (soup_uri, username);
@@ -1576,17 +1578,25 @@ caldav_browse_server (GtkWindow *parent,
{
GtkWidget *dialog, *new_url_entry, *new_usermail_combo, *new_autoschedule_check;
gchar *url, *new_url = NULL;
+ SoupURI *soup_uri = NULL;
+
g_return_val_if_fail (server_url != NULL, NULL);
url = prepare_url (server_url, use_ssl);
+ if (url && *url)
+ soup_uri = soup_uri_new (url);
- if (!url || !*url) {
+ if (!url || !*url || !soup_uri) {
e_notice (parent, GTK_MESSAGE_ERROR, _("Server URL '%s' is not a valid URL"), server_url);
+ if (soup_uri)
+ soup_uri_free (soup_uri);
g_free (url);
return NULL;
}
+ soup_uri_free (soup_uri);
+
dialog = gtk_dialog_new_with_buttons (
_("Browse for a CalDAV calendar"),
parent,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]