Merged revisions 85536 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k

........
  r85536 | georg.brandl | 2010-10-15 18:26:08 +0200 (Fr, 15 Okt 2010) | 1 line

  #9054: fix crash when using pyexpat with a system expat lib version 2.0.1.
........
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index 389975d..cc62274 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -397,6 +397,9 @@
     PyObject *args;
     PyObject *temp;
 
+    if (!have_handler(self, CharacterData))
+        return -1;
+
     args = PyTuple_New(1);
     if (args == NULL)
         return -1;