aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-09-05 03:53:38 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-09-05 03:53:38 +0800
commitd44e32c6751458e1e9c57d97129a04197aa2179b (patch)
tree468e5f60eca5cebc7645013d3fe8f97d62ac6adb
parentef964d6f948faf8e0cf59db9ec39e2047ae97296 (diff)
downloadgsoc2013-evolution-d44e32c6751458e1e9c57d97129a04197aa2179b.tar
gsoc2013-evolution-d44e32c6751458e1e9c57d97129a04197aa2179b.tar.gz
gsoc2013-evolution-d44e32c6751458e1e9c57d97129a04197aa2179b.tar.bz2
gsoc2013-evolution-d44e32c6751458e1e9c57d97129a04197aa2179b.tar.lz
gsoc2013-evolution-d44e32c6751458e1e9c57d97129a04197aa2179b.tar.xz
gsoc2013-evolution-d44e32c6751458e1e9c57d97129a04197aa2179b.tar.zst
gsoc2013-evolution-d44e32c6751458e1e9c57d97129a04197aa2179b.zip
(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
-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);
}