Index: atk-bridge/bridge.c
===================================================================
--- atk-bridge/bridge.c	(revision 1146)
+++ atk-bridge/bridge.c	(working copy)
@@ -135,6 +135,7 @@
 							gpointer               data);
 static void     spi_atk_tidy_windows                   (void);
 static void     deregister_application                 (BonoboObject          *app);
+static void     reinit_register_vars                   (void);
 
 /* For automatic libgnome init */
 extern void gnome_accessibility_module_init     (void);
@@ -314,6 +315,7 @@
   if (toplevels == 0)
     {
       deregister_application (app);
+      reinit_register_vars ();
     }
   if (toplevels < 0)
     {
@@ -1349,6 +1351,14 @@
 }
 
 static void
+reinit_register_vars (void)
+{
+  registry = CORBA_OBJECT_NIL;
+  device_event_controller = CORBA_OBJECT_NIL;
+  this_app = NULL;
+}
+
+static void
 spi_atk_bridge_init_base (CORBA_any *any, AtkObject *obj, 
 			  Accessibility_Application *app, Accessibility_Role *role,
 			  CORBA_string *name)
