Index: trunk/MagicSoft/Cosy/catalog/StarCatalog.cc
===================================================================
--- trunk/MagicSoft/Cosy/catalog/StarCatalog.cc	(revision 2280)
+++ trunk/MagicSoft/Cosy/catalog/StarCatalog.cc	(revision 2407)
@@ -14,5 +14,5 @@
 ClassImp(StarCatalog);
 
-StarCatalog::StarCatalog(MObservatory::LocationName_t key) : SlaStars(key), fEntries(0), fSinAngle(0), fCosAngle(1)
+StarCatalog::StarCatalog(MObservatory::LocationName_t key) : SlaStars(key), fSao(NULL), fSrt(NULL), fEntries(0), fSinAngle(0), fCosAngle(1)
 {
     // p = pointer to MainFrame (not owner)
@@ -22,7 +22,6 @@
     //
     File idx("sao/sao-sort.idx", "r");
-
     if (!idx)
-        exit(0);
+        return;
 
     while (!idx.Eof())
@@ -52,6 +51,8 @@
 StarCatalog::~StarCatalog()
 {
-    delete fSrt;
-    delete fSao;
+    if (fSrt)
+        delete fSrt;
+    if (fSao)
+        delete fSao;
 }
 
@@ -647,4 +648,7 @@
     // --------- search for stars in catalog ----------
     //
+    if (fEntries==0)
+        return;
+
     int count   = 0;
     int deleted = 0;
