aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs/cal-backend-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/pcs/cal-backend-file.c')
-rw-r--r--calendar/pcs/cal-backend-file.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/calendar/pcs/cal-backend-file.c b/calendar/pcs/cal-backend-file.c
index 599c09b465..ad15d0433c 100644
--- a/calendar/pcs/cal-backend-file.c
+++ b/calendar/pcs/cal-backend-file.c
@@ -284,6 +284,8 @@ save (CalBackendFile *cbfile)
g_assert (priv->icalcomp != NULL);
uri = gnome_vfs_uri_new (priv->uri);
+ if (!uri)
+ goto error;
/* Make a backup copy of the file if it exists */
tmp = gnome_vfs_uri_to_string (uri, GNOME_VFS_URI_HIDE_NONE);
@@ -883,7 +885,8 @@ cal_backend_file_open (CalBackend *backend, const char *uristr, gboolean only_if
| GNOME_VFS_URI_HIDE_HOST_NAME
| GNOME_VFS_URI_HIDE_HOST_PORT
| GNOME_VFS_URI_HIDE_TOPLEVEL_METHOD));
- if (!str_uri) {
+ if (!str_uri || !strlen (str_uri)) {
+ g_free (str_uri);
gnome_vfs_uri_unref (uri);
return CAL_BACKEND_OPEN_ERROR;
}