aboutsummaryrefslogtreecommitdiffstats
path: root/shell
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
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')
-rw-r--r--shell/ChangeLog6
-rw-r--r--shell/e-storage-set-view.c18
2 files changed, 16 insertions, 8 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 68e3049f8a..3292acfb88 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,11 @@
2001-03-21 Ettore Perazzoli <ettore@ximian.com>
+ * e-storage-set-view.c (etree_get_save_id): If we have no
+ associated StorageSet yet, just return "root". [This can happen
+ when this function is called at construction time.]
+
+2001-03-21 Ettore Perazzoli <ettore@ximian.com>
+
* Evolution-ShellComponentDnd.idl: StudlyCapsify struct members to
match the new IDL naming standards.
* e-storage-set-view.c: Updated accordingly.
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");
}