From d44e32c6751458e1e9c57d97129a04197aa2179b Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Wed, 4 Sep 2002 19:53:38 +0000 Subject: (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] svn path=/trunk/; revision=17974 --- shell/ChangeLog | 7 +++++++ shell/e-shell-view.c | 6 ++++++ 2 files changed, 13 insertions(+) (limited to 'shell') 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 + + * 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 * 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); } -- cgit