aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-storage-set-view.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-03-21 16:31:29 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-03-21 16:31:29 +0800
commit33688c3aece916519259f177b3fa0d2af76ca725 (patch)
tree9bfb41d010a2af75bbc9a52deddbfcd234966de6 /shell/e-storage-set-view.c
parent97f26b5a13ff86cc939cf57bb5040d2249679841 (diff)
downloadgsoc2013-evolution-33688c3aece916519259f177b3fa0d2af76ca725.tar
gsoc2013-evolution-33688c3aece916519259f177b3fa0d2af76ca725.tar.gz
gsoc2013-evolution-33688c3aece916519259f177b3fa0d2af76ca725.tar.bz2
gsoc2013-evolution-33688c3aece916519259f177b3fa0d2af76ca725.tar.lz
gsoc2013-evolution-33688c3aece916519259f177b3fa0d2af76ca725.tar.xz
gsoc2013-evolution-33688c3aece916519259f177b3fa0d2af76ca725.tar.zst
gsoc2013-evolution-33688c3aece916519259f177b3fa0d2af76ca725.zip
Fix a stupid g_warning caused by calling EStorageSet functions on a
NULL pointer. svn path=/trunk/; revision=8865
Diffstat (limited to 'shell/e-storage-set-view.c')
-rw-r--r--shell/e-storage-set-view.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/shell/e-storage-set-view.c b/shell/e-storage-set-view.c
index 1b31e018f0..5833e64184 100644
--- a/shell/e-storage-set-view.c
+++ b/shell/e-storage-set-view.c
@@ -1176,16 +1176,18 @@ etree_get_save_id (ETreeModel *etm, ETreePath node, void *model_data)
storage_set_view = E_STORAGE_SET_VIEW (model_data);
storage_set = storage_set_view->priv->storage_set;
- path = (char *) e_tree_memory_node_get_data (E_TREE_MEMORY(etm), node);
+ if (storage_set != NULL) {
+ path = (char *) e_tree_memory_node_get_data (E_TREE_MEMORY(etm), node);
- folder = e_storage_set_get_folder (storage_set, path);
- if (folder != NULL) {
- return g_strdup (e_folder_get_name (folder));
- }
+ folder = e_storage_set_get_folder (storage_set, path);
+ if (folder != NULL) {
+ return g_strdup (e_folder_get_name (folder));
+ }
- storage = e_storage_set_get_storage (storage_set, path + 1);
- if (storage != NULL)
- return g_strdup (e_storage_get_name (storage));
+ storage = e_storage_set_get_storage (storage_set, path + 1);
+ if (storage != NULL)
+ return g_strdup (e_storage_get_name (storage));
+ }
return g_strdup("root");
}