aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog7
-rw-r--r--shell/e-shell-view.c6
2 files changed, 13 insertions, 0 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index f9c2a02dfb..af15fdc6ee 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,10 @@
+2002-09-04 Ettore Perazzoli <ettore@ximian.com>
+
+ * e-shell-view.c (e_shell_view_get_current_component_id): If the
+ current_folder_type is NULL, just return NULL instead of passing
+ it to e_folder_type_registry_get_handler_for_type() [and generate
+ a warning]. [#21122]
+
2002-09-04 Dan Winship <danw@ximian.com>
* glade/e-shell-shared-folder-picker-dialog.glade: Remove the
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index cee729a950..a0cc727047 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -2589,8 +2589,14 @@ e_shell_view_get_current_component_id (EShellView *shell_view)
priv = shell_view->priv;
type_registry = e_shell_get_folder_type_registry (priv->shell);
+
current_folder_type = e_shell_view_get_current_folder_type (shell_view);
+ if (current_folder_type == NULL)
+ return NULL;
+
component_client = e_folder_type_registry_get_handler_for_type (type_registry, current_folder_type);
+ if (component_client == NULL)
+ return NULL;
return evolution_shell_component_client_get_id (component_client);
}