Index: /branches/eam_branches/ipp-20150625/Ohana/src/libdvo/src/dvo_catalog_split.c
===================================================================
--- /branches/eam_branches/ipp-20150625/Ohana/src/libdvo/src/dvo_catalog_split.c	(revision 38657)
+++ /branches/eam_branches/ipp-20150625/Ohana/src/libdvo/src/dvo_catalog_split.c	(revision 38658)
@@ -92,4 +92,6 @@
   if (OHANA_MEMCHECK) ohana_memcheck (TRUE);
   
+  if (!catalog->f) return TRUE;
+
   /* rewind file pointers and truncate (file is still open) */
   if (fseeko (catalog->f, 0LL, SEEK_SET)) {
@@ -1003,5 +1005,5 @@
 
   /*** Lensing Table ***/
-  if ((catalog[0].catflags & DVO_LOAD_LENSING) && (catalog[0].lensing != NULL)) {
+  if ((catalog[0].catflags & DVO_LOAD_LENSING) && catalog[0].lensing && Nlensing_disk_new) {
 
     off_t first  = 0;                    // first row in memory to write
@@ -1034,5 +1036,5 @@
 
   /*** Lensobj Table ***/
-  if ((catalog[0].catflags & DVO_LOAD_LENSOBJ) && (catalog[0].lensobj != NULL)) {
+  if ((catalog[0].catflags & DVO_LOAD_LENSOBJ) && catalog[0].lensobj && Nlensobj_disk_new) {
 
     off_t first  = 0;                    // first row in memory to write
@@ -1065,5 +1067,5 @@
 
   /*** StarPar Table ***/
-  if ((catalog[0].catflags & DVO_LOAD_STARPAR) && (catalog[0].starpar != NULL)) {
+  if ((catalog[0].catflags & DVO_LOAD_STARPAR) && catalog[0].starpar && Nstarpar_disk_new) {
 
     off_t first  = 0;                    // first row in memory to write
@@ -1096,5 +1098,5 @@
 
   /*** GalPhot Table ***/
-  if ((catalog[0].catflags & DVO_LOAD_GALPHOT) && (catalog[0].galphot != NULL)) {
+  if ((catalog[0].catflags & DVO_LOAD_GALPHOT) && catalog[0].galphot && Ngalphot_disk_new) {
 
     off_t first  = 0;                    // first row in memory to write
