Index: src/orca/Gecko.py
===================================================================
--- src/orca/Gecko.py	(revision 2073)
+++ src/orca/Gecko.py	(working copy)
@@ -3088,15 +3088,18 @@
 
         crossedLineBoundary = False
         [lastObj, lastCharacterOffset] = [obj, characterOffset]
-        previousChar = None
         while obj:
             extents = self.getExtents(
                 obj, characterOffset, characterOffset + 1)
-            if characterOffset > 0:
-                previousChar = \
+            if obj.text:
+                if characterOffset > 0:
+                    previousChar = \
                         obj.text.getText(characterOffset - 1, characterOffset)
-            currentChar = obj.text.getText(characterOffset,
-                                           characterOffset + 1)
+                currentChar = obj.text.getText(characterOffset,
+                                               characterOffset + 1)
+            else:
+                previousChar = None
+                currentChar = None    
 
             #print "GPL LOOKING AT", obj.role, extents
 
@@ -3161,15 +3164,18 @@
 
         crossedLineBoundary = False
         [lastObj, lastCharacterOffset] = [obj, characterOffset]
-        previousChar = None
         while obj:
             extents = self.getExtents(
                 obj, characterOffset, characterOffset + 1)
-            if characterOffset > 0:
-                previousChar = \
+            if obj.text:
+                if characterOffset > 0:
+                    previousChar = \
                         obj.text.getText(characterOffset - 1, characterOffset)
-            currentChar = \
+                currentChar = \
                         obj.text.getText(characterOffset, characterOffset + 1)
+            else:
+                previousChar = None
+                currentChar = None
 
             #print "GNL LOOKING AT", obj.role, extents
 
