diff options
author | Michael Meeks <michael@helixcode.com> | 2000-12-05 01:56:54 +0800 |
---|---|---|
committer | Michael Meeks <mmeeks@src.gnome.org> | 2000-12-05 01:56:54 +0800 |
commit | 042e514a262c922d258ca8f0557500199f7088d9 (patch) | |
tree | f985a0aee46d4c6ff8bc42c2ef3958eba4024c6b /shell | |
parent | 0d0f668cecd72010ef87c08829b26abd83e3a252 (diff) | |
download | gsoc2013-evolution-042e514a262c922d258ca8f0557500199f7088d9.tar.gz gsoc2013-evolution-042e514a262c922d258ca8f0557500199f7088d9.tar.zst gsoc2013-evolution-042e514a262c922d258ca8f0557500199f7088d9.zip |
return NULL if we can't create a view.
2000-12-04 Michael Meeks <michael@helixcode.com>
* e-shell-view.c (get_control_for_uri): return NULL if we can't
create a view.
(setup_evolution_shell_view_interface): add precondition.
+
lots of cleans.
svn path=/trunk/; revision=6778
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ChangeLog | 6 | ||||
-rw-r--r-- | shell/e-shell-view.c | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index df600ac65c..e3a33d5953 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,9 @@ +2000-12-04 Michael Meeks <michael@helixcode.com> + + * e-shell-view.c (get_control_for_uri): return NULL if we can't + create a view. + (setup_evolution_shell_view_interface): add precondition. + 2000-12-04 Ettore Perazzoli <ettore@helixcode.com> * e-shortcuts-view.c (e_shortcuts_view_construct): Ref the diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index 884396d149..a82ba563b8 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -1108,6 +1108,8 @@ setup_corba_interface (EShellView *shell_view, BonoboControlFrame *control_frame; EvolutionShellView *corba_interface; + g_return_if_fail (control != NULL); + priv = shell_view->priv; control_frame = bonobo_widget_get_control_frame (BONOBO_WIDGET (control)); @@ -1254,7 +1256,7 @@ get_control_for_uri (EShellView *shell_view, CORBA_exception_init (&ev); corba_control = GNOME_Evolution_ShellComponent_createView (handler, e_folder_get_physical_uri (folder), - folder_type, &ev); + folder_type, &ev); if (ev._major != CORBA_NO_EXCEPTION) { CORBA_exception_free (&ev); @@ -1263,6 +1265,9 @@ get_control_for_uri (EShellView *shell_view, CORBA_exception_free (&ev); + if (corba_control == CORBA_OBJECT_NIL) + return NULL; + container = bonobo_ui_component_get_container (priv->ui_component); control = bonobo_widget_new_control_from_objref (corba_control, container); |