Index: pyatspi/accessible.py
===================================================================
--- pyatspi/accessible.py	(revision 981)
+++ pyatspi/accessible.py	(working copy)
@@ -630,6 +630,7 @@
     try:
       while curr.parent is not None and (not curr.parent == curr):
         curr = curr.parent
+      curr.ref()
       return curr._narrow(Accessibility.Application)
     except:
       return None
