aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/nntp/camel-nntp-folder.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@helixcode.com>2000-08-22 04:47:09 +0800
committerJP Rosevear <jpr@src.gnome.org>2000-08-22 04:47:09 +0800
commitfc7e2aa10eaf410fa379b361b24498e7f8037e70 (patch)
treef64fc78f693967c8173c7f95227f7e1e2524ef11 /camel/providers/nntp/camel-nntp-folder.c
parentd1c902092fe7e6a93b7da2bf3750b83a6663b046 (diff)
downloadgsoc2013-evolution-fc7e2aa10eaf410fa379b361b24498e7f8037e70.tar
gsoc2013-evolution-fc7e2aa10eaf410fa379b361b24498e7f8037e70.tar.gz
gsoc2013-evolution-fc7e2aa10eaf410fa379b361b24498e7f8037e70.tar.bz2
gsoc2013-evolution-fc7e2aa10eaf410fa379b361b24498e7f8037e70.tar.lz
gsoc2013-evolution-fc7e2aa10eaf410fa379b361b24498e7f8037e70.tar.xz
gsoc2013-evolution-fc7e2aa10eaf410fa379b361b24498e7f8037e70.tar.zst
gsoc2013-evolution-fc7e2aa10eaf410fa379b361b24498e7f8037e70.zip
Make sure newsrc is not null (nntp_folder_get_subfolder_names): ditto
2000-08-21 JP Rosevear <jpr@helixcode.com> * providers/nntp/camel-nntp-folder.c (nntp_folder_get_subfolder_names): Make sure newsrc is not null (nntp_folder_get_subfolder_names): ditto * providers/nntp/camel-nntp-newsrc.c (camel_nntp_newsrc_get_subscribed_group_names): Programming check for newsrc == NULL (camel_nntp_newsrc_get_all_group_names): ditto (camel_nntp_newsrc_write_to_file): ditto (camel_nntp_newsrc_write): ditto svn path=/trunk/; revision=4908
Diffstat (limited to 'camel/providers/nntp/camel-nntp-folder.c')
-rw-r--r--camel/providers/nntp/camel-nntp-folder.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/camel/providers/nntp/camel-nntp-folder.c b/camel/providers/nntp/camel-nntp-folder.c
index 87d401caca..091d35e591 100644
--- a/camel/providers/nntp/camel-nntp-folder.c
+++ b/camel/providers/nntp/camel-nntp-folder.c
@@ -131,7 +131,9 @@ nntp_folder_sync (CamelFolder *folder, gboolean expunge,
camel_folder_summary_save (CAMEL_NNTP_FOLDER(folder)->summary);
store = CAMEL_NNTP_STORE (camel_folder_get_parent_store (folder));
- camel_nntp_newsrc_write (store->newsrc);
+
+ if (store->newsrc)
+ camel_nntp_newsrc_write (store->newsrc);
}
static CamelFolder*
@@ -309,12 +311,14 @@ nntp_folder_get_subfolder_names (CamelFolder *folder)
{
if (!strcmp (folder->name, "/")) {
CamelStore *store = camel_folder_get_parent_store (folder);
- GPtrArray *array = camel_nntp_newsrc_get_subscribed_group_names (CAMEL_NNTP_STORE (store)->newsrc);
- return array;
- }
- else {
- return NULL;
+
+ if (CAMEL_NNTP_STORE (store)->newsrc) {
+ GPtrArray *array = camel_nntp_newsrc_get_subscribed_group_names (CAMEL_NNTP_STORE (store)->newsrc);
+ return array;
+ }
}
+
+ return NULL;
}
static void