Index: src/orca/Gecko.py
===================================================================
--- src/orca/Gecko.py	(revision 2713)
+++ src/orca/Gecko.py	(working copy)
@@ -3843,7 +3843,7 @@
         # on the display.]]]
         #
         lineContentsOffset = focusedCharacterOffset
-        if focusedObj and focusedObj.text:
+        if focusedObj and focusedObj.text and focusedObj.text.characterCount:
             char = self.getText(focusedObj,
                                 focusedCharacterOffset,
                                 focusedCharacterOffset + 1)
@@ -3899,7 +3899,8 @@
                 regions = [braille.Text(obj, label, " $l")]
                 if isFocusedObj:
                     focusedRegion = regions[0]
-            elif obj.text and (obj.role != rolenames.ROLE_MENU_ITEM):
+            elif obj.text and obj.text.characterCount \
+                 and (obj.role != rolenames.ROLE_MENU_ITEM):
                 string = self.getText(obj, startOffset, endOffset)
                 regions = [braille.Region(
                     string,
@@ -4532,7 +4533,8 @@
         # item, get the object extents rather than the range extents for
         # the text.
         #
-        if obj.text and obj.role != rolenames.ROLE_MENU_ITEM:
+        if obj.text and obj.text.characterCount \
+           and obj.role != rolenames.ROLE_MENU_ITEM:
             extents = obj.text.getRangeExtents(startOffset, endOffset, 0)
         else:
             ext = obj.extents
@@ -5707,7 +5709,7 @@
         if not obj or not self.inDocumentContent(obj):
             return [None, -1]
 
-        if obj.text:
+        if obj.text and obj.text.characterCount:
             unicodeText = self.getUnicodeText(obj)
             nextOffset = startOffset + 1
             if nextOffset < len(unicodeText):
@@ -5783,7 +5785,7 @@
         if not obj or not self.inDocumentContent(obj):
             return [None, -1]
 
-        if obj.text:
+        if obj.text and obj.text.characterCount:
             unicodeText = self.getUnicodeText(obj)
             if startOffset == -1:
                 startOffset = len(unicodeText)
@@ -6260,7 +6262,7 @@
         given object or None if the object does not implement the
         accessible text specialization.
         """
-        if obj and obj.text:
+        if obj and obj.text and obj.text.characterCount:
             unicodeText = self.getUnicodeText(obj)
             return unicodeText[characterOffset].encode("UTF-8")
         else:
@@ -6293,7 +6295,7 @@
         encounteredText = False
         [lastObj, lastCharacterOffset] = [obj, characterOffset]
         while obj == lastObj:
-            if not obj.text:
+            if not obj.text or not obj.text.characterCount:
                 break
             else:
                 character = self.getCharacterAtOffset(obj, characterOffset)
@@ -6315,7 +6317,7 @@
         encounteredDelimiter = False
         [obj, characterOffset] = [lastObj, lastCharacterOffset]
         while obj and (obj == lastObj):
-            if not obj.text:
+            if not obj.text or not obj.text.characterCount:
                 break
             else:
                 character = self.getCharacterAtOffset(obj, characterOffset)
@@ -6450,7 +6452,7 @@
         #if not obj.state.count(atspi.Accessibility.STATE_SHOWING):
         #    return [[None, -1, -1]]
 
-        if not obj.text:
+        if not obj.text or not obj.text.characterCount:
             return [[obj, -1, -1]]
 
         contents = []
@@ -6551,7 +6553,7 @@
                 #
                 speakThisRole = False
                 strings = self.speechGenerator.getSpeech(obj, False)
-            elif obj.text \
+            elif obj.text and obj.text.characterCount \
                and not obj.role in [rolenames.ROLE_ENTRY,
                                     rolenames.ROLE_PASSWORD_TEXT,
                                     rolenames.ROLE_RADIO_BUTTON,
@@ -6563,7 +6565,7 @@
                 strings = self.speechGenerator.getSpeech(obj, False)
 
             if speakRole and speakThisRole:
-                if obj.text:
+                if obj.text and obj.text.characterCount:
                     strings.extend(\
                        self.speechGenerator._getSpeechForObjectRole(obj))
 
@@ -6838,7 +6840,7 @@
         while obj:
             extents = self.getExtents(
                 obj, characterOffset, characterOffset + 1)
-            if obj.text:
+            if obj.text and obj.text.characterCount:
                 if characterOffset > 0:
                     previousChar = \
                         obj.text.getText(characterOffset - 1, characterOffset)
@@ -6945,7 +6947,7 @@
         while obj:
             extents = self.getExtents(
                 obj, characterOffset, characterOffset + 1)
-            if obj.text:
+            if obj.text and obj.text.characterCount:
                 if characterOffset > 0:
                     previousChar = \
                         obj.text.getText(characterOffset - 1, characterOffset)
