Index: Common/vtkPythonUtil.cxx
===================================================================
RCS file: /cvsroot/VTK/VTK/Common/vtkPythonUtil.cxx,v
retrieving revision 1.87
diff -u -r1.87 vtkPythonUtil.cxx
--- Common/vtkPythonUtil.cxx	4 Jul 2008 22:32:54 -0000	1.87
+++ Common/vtkPythonUtil.cxx	3 Aug 2008 11:13:01 -0000
@@ -1963,6 +1963,14 @@
   PyObject *arglist, *result, *obj2;
   const char *eventname;
 
+  // In some rare cases it is possible for the command to be invoked
+  // after Py_Finalize is called, this will cause nasty errors so we
+  // return if the interpreter is not initialized.
+  if (Py_IsInitialized() == 0)
+    {
+    return;
+    }
+
 #ifndef VTK_NO_PYTHON_THREADS
 #if (PY_MAJOR_VERSION > 2) || \
 ((PY_MAJOR_VERSION == 2) && (PY_MINOR_VERSION >= 3))
