diff --git a/Filtering/vtkColorTransferFunction.cxx b/Filtering/vtkColorTransferFunction.cxx
index 0ff8f37..3045a1f 100644
--- a/Filtering/vtkColorTransferFunction.cxx
+++ b/Filtering/vtkColorTransferFunction.cxx
@@ -14,6 +14,7 @@
 =========================================================================*/
 #include "vtkColorTransferFunction.h"
 
+#include "vtkCriticalSection.h"
 #include "vtkMath.h"
 #include "vtkObjectFactory.h"
 #include <vector>
@@ -90,6 +91,8 @@ public:
   vtkCTFFindNodeEqual         FindNodeEqual;
   vtkCTFFindNodeInRange       FindNodeInRange;
   vtkCTFFindNodeOutOfRange    FindNodeOutOfRange;
+
+  vtkSimpleCriticalSection    TableCriticalSection; // Not a vtkObject.
 };
 
 //=============================================================================
@@ -1075,9 +1078,11 @@ void vtkColorTransferFunction::GetTable( double xStart, double xEnd,
 const unsigned char *vtkColorTransferFunction::GetTable( double xStart, double xEnd, 
                                                          int size)
 {
+  this->Internal->TableCriticalSection.Lock();
   if (this->GetMTime() <= this->BuildTime &&
       this->TableSize == size)
     {
+    this->Internal->TableCriticalSection.Unlock();
     return this->Table;
     }
 
@@ -1085,34 +1090,37 @@ const unsigned char *vtkColorTransferFunction::GetTable( double xStart, double x
     {
     vtkErrorMacro( 
       "Attempting to lookup a value with no points in the function");
+    this->Internal->TableCriticalSection.Unlock();
     return this->Table;
     }
   
   if (this->TableSize != size)
     {
-    delete [] this->Table;
-    this->Table = new unsigned char [size*3];
-    this->TableSize = size;
+      delete [] this->Table;
+      this->Table = new unsigned char [size*3];
+      this->TableSize = size;
     }
-  
+
   double *tmpTable = new double [size*3];
-  
+
   this->GetTable( xStart, xEnd, size, tmpTable );
-  
+
   double *tmpPtr = tmpTable;
   unsigned char *tPtr = this->Table;
-  
+
   for ( int i = 0; i < size*3; i++ )
-    {
+  {
     *tPtr = static_cast<unsigned char>(*tmpPtr*255.0 + 0.5);
     tPtr   ++;
     tmpPtr ++;
-    }
+  }
 
   delete[] tmpTable;
 
   this->BuildTime.Modified();
 
+  this->Internal->TableCriticalSection.Unlock();
+
   return this->Table;
 }
 
@@ -1453,6 +1461,15 @@ void vtkColorTransferFunction::MapScalarsThroughTable2(void *input,
     vtkDebugMacro("Transfer Function Has No Points!");
     return;
     }
+  if (input == NULL) {
+      vtkErrorMacro(<< "MapImageThroughTable: Input is NULL");
+      return;
+  }
+  if (output == NULL) {
+      vtkErrorMacro(<< "MapImageThroughTable: Output is NULL");
+      return;
+  }
+
   switch (inputDataType)
     {
     vtkTemplateMacro(
