diff options
author | Maciej Stachowiak <mstachow@src.gnome.org> | 2000-09-11 03:32:05 +0000 |
---|---|---|
committer | Maciej Stachowiak <mstachow@src.gnome.org> | 2000-09-11 03:32:05 +0000 |
commit | a68a7e1f2d707a03af628529566793d81882bffa (patch) | |
tree | f79de9e32027cbe3ca048213ff33c73e7765fc6b /libnautilus/nautilus-view.c | |
parent | 8a7a6d3ff511f73a79a684dc91c1187785f613a2 (diff) | |
download | nautilus-a68a7e1f2d707a03af628529566793d81882bffa.tar.gz |
Handle a QI failure properly, fixing bugzilla.eazel.com 2545.
* libnautilus/nautilus-view.c (view_frame_call_begin,
view_frame_call_end): Handle a QI failure properly, fixing
bugzilla.eazel.com 2545.
Diffstat (limited to 'libnautilus/nautilus-view.c')
-rw-r--r-- | libnautilus/nautilus-view.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/libnautilus/nautilus-view.c b/libnautilus/nautilus-view.c index fa898567a..206faaaf4 100644 --- a/libnautilus/nautilus-view.c +++ b/libnautilus/nautilus-view.c @@ -301,19 +301,30 @@ nautilus_view_destroy (GtkObject *object) static Nautilus_ViewFrame view_frame_call_begin (NautilusView *view, CORBA_Environment *ev) { + Nautilus_ViewFrame *view_frame; + g_return_val_if_fail (NAUTILUS_IS_VIEW (view), CORBA_OBJECT_NIL); - /* FIXME bugzilla.eazel.com 2545: Do we have to handle failure in this query? */ CORBA_exception_init (ev); - return Bonobo_Unknown_query_interface + + view_frame = Bonobo_Unknown_query_interface (bonobo_control_get_control_frame (nautilus_view_get_bonobo_control (view)), "IDL:Nautilus/ViewFrame:1.0", ev); + + if (ev->_major != CORBA_NO_EXCEPTION) { + view_frame = CORB_OBJECT_NIL; + } + + return view_frame; } static void view_frame_call_end (Nautilus_ViewFrame frame, CORBA_Environment *ev) { - bonobo_object_release_unref (frame, ev); + if (frame != CROBA_OBJECT_NIL) { + bonobo_object_release_unref (frame, ev); + } + CORBA_exception_free (ev); } |