Index: /trunk/Ohana/src/addstar/src/gstars.c
===================================================================
--- /trunk/Ohana/src/addstar/src/gstars.c	(revision 5383)
+++ /trunk/Ohana/src/addstar/src/gstars.c	(revision 5384)
@@ -171,22 +171,28 @@
   fseek (f, header.size, SEEK_SET); 
 
-  /* read from FITS table or from text table */
-  extend = FALSE;
-  fits_scan (&header, "EXTEND",  "%t", 1, &extend);
-  if (extend && !TEXTMODE) {
-    Nbytes = fits_matrix_size (&header);
-    fseek (f, Nbytes, SEEK_CUR); 
-    rdstars = rfits (f, &image[0].nstar);
-    if (rdstars == NULL) {
-      fprintf (stderr, "ERROR: failed to read fits table\n");
-      exit (1);
-    }
+  /* don't try to read stars for mosaic */
+  if (!strcmp (&image[0].coords.ctype[4], "-DIS")) {
+    rdstars = NULL;
+    image[0].nstar = 0;
   } else {
-    /* allocate space for stars */
-    if (!fits_scan (&header, "NSTARS", "%d", 1, &image[0].nstar)) {
-      fprintf (stderr, "ERROR: failed to find NSTARS\n");
-      exit (1);
-    }
-    rdstars = rtext (f, &image[0].nstar);
+    /* read from FITS table or from text table */
+    extend = FALSE;
+    fits_scan (&header, "EXTEND",  "%t", 1, &extend);
+    if (extend && !TEXTMODE) {
+      Nbytes = fits_matrix_size (&header);
+      fseek (f, Nbytes, SEEK_CUR); 
+      rdstars = rfits (f, &image[0].nstar);
+      if (rdstars == NULL) {
+	fprintf (stderr, "ERROR: failed to read fits table\n");
+	exit (1);
+      }
+    } else {
+      /* allocate space for stars */
+      if (!fits_scan (&header, "NSTARS", "%d", 1, &image[0].nstar)) {
+	fprintf (stderr, "ERROR: failed to find NSTARS\n");
+	exit (1);
+      }
+      rdstars = rtext (f, &image[0].nstar);
+    }
   }
   fclose (f);
