[gnome-calendar] source-manager: don't try to save NULL sources



commit 3c5a1ebfe6bd77bbf4df5dce16ac65fe8a6f3a76
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Mon Feb 9 17:23:30 2015 -0200

    source-manager: don't try to save NULL sources

 src/gcal-source-dialog.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
index e68f02f..fc77a85 100644
--- a/src/gcal-source-dialog.c
+++ b/src/gcal-source-dialog.c
@@ -214,7 +214,8 @@ response_signal (GtkDialog *dialog,
   /* save the source */
   if (priv->mode == GCAL_SOURCE_DIALOG_MODE_EDIT || response_id == GTK_RESPONSE_APPLY)
     {
-      gcal_manager_save_source (priv->manager, priv->source);
+      if (priv->source)
+        gcal_manager_save_source (priv->manager, priv->source);
     }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]