Index: nautilus-main.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-main.c,v
retrieving revision 1.132
diff -u -w -r1.132 nautilus-main.c
--- nautilus-main.c     16 Apr 2003 08:31:37 -0000      1.132
+++ nautilus-main.c     18 Sep 2003 03:06:24 -0000
@@ -252,6 +252,8 @@
  
        bonobo_activate (); /* do now since we need it before main loop */
  
+       application = NULL;
+
        /* Do either the self-check or the real work. */
        if (perform_self_check) {
 #ifndef NAUTILUS_OMIT_SELF_CHECK
@@ -279,12 +281,16 @@
                if (is_event_loop_needed ()) {
                        gtk_main ();
                }
-               bonobo_object_unref (application);
        }
  
        poptFreeContext (popt_context);
  
        gnome_vfs_shutdown ();
+
+       if (application != NULL) {
+               bonobo_object_unref (application);
+       }
+
        eel_debug_shut_down ();
        bonobo_ui_debug_shutdown ();

