aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/e-shell-view.c')
-rw-r--r--shell/e-shell-view.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 38507668ce..2e14e2966c 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -1251,6 +1251,8 @@ get_type_for_storage (EShellView *shell_view,
storage_set = e_shell_get_storage_set (priv->shell);
storage = e_storage_set_get_storage (storage_set, name);
+ if (!storage)
+ return NULL;
*physical_uri_return = e_storage_get_toplevel_node_uri (storage);
@@ -1271,6 +1273,8 @@ get_type_for_folder (EShellView *shell_view,
storage_set = e_shell_get_storage_set (priv->shell);
folder = e_storage_set_get_folder (storage_set, path);
+ if (!folder)
+ return NULL;
*physical_uri_return = e_folder_get_physical_uri (folder);
@@ -1311,11 +1315,13 @@ get_control_for_uri (EShellView *shell_view,
/* FIXME: This code needs to be made more robust. */
- slash = strchr (path, G_DIR_SEPARATOR);
+ slash = strchr (path + 1, G_DIR_SEPARATOR);
if (slash == NULL || slash[1] == '\0')
folder_type = get_type_for_storage (shell_view, path, &physical_uri);
else
folder_type = get_type_for_folder (shell_view, path, &physical_uri);
+ if (!folder_type)
+ return NULL;
folder_type_registry = e_shell_get_folder_type_registry (e_shell_view_get_shell (shell_view));