Index: trunk/psphot/src/psphotTestSourceOutput.c
===================================================================
--- trunk/psphot/src/psphotTestSourceOutput.c	(revision 12950)
+++ trunk/psphot/src/psphotTestSourceOutput.c	(revision 14655)
@@ -21,5 +21,4 @@
     psVector *x = psVectorAlloc(2, PS_TYPE_F32);
     psVector *params = model->params;
-    pmModelFunc modelFunc = pmModelFunc_GetFunction (model->type);
     psS32 imageCol;
     psS32 imageRow;
@@ -68,5 +67,5 @@
             // set the appropriate pixel value for this coordinate
 	    if (mode & PSPHOT_ADD_MODEL) {
-		pixelValue = modelFunc (NULL, params, x) - skyValue;
+		pixelValue = model->modelFunc (NULL, params, x) - skyValue;
 	    } else {
 		pixelValue = 0.0;
