Index: trunk/psModules/src/objects/pmSourceIO.c
===================================================================
--- trunk/psModules/src/objects/pmSourceIO.c	(revision 17396)
+++ trunk/psModules/src/objects/pmSourceIO.c	(revision 17635)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.56 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2008-04-08 18:35:38 $
+ *  @version $Revision: 1.57 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2008-05-12 21:52:18 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -259,6 +259,10 @@
     // XXX if sources is NULL, skip the cell or write out empty tables?
     psArray *sources = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.SOURCES");
-    if (sources == NULL)
-        return true;
+    if (!sources) {
+        sources = psArrayAlloc(0);
+        psMetadataAddArray(readout->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_META_REPLACE,
+                           "Blank array of sources", sources);
+        psFree(sources);                // Held onto by the metadata, so we can continue to use
+    }
 
     switch (file->type) {
@@ -468,6 +472,6 @@
         psFree (headname);
         psFree (dataname);
-	psFree (xsrcname);
-	psFree (xfitname);
+        psFree (xsrcname);
+        psFree (xfitname);
         psFree (outhead);
         break;
