[GRASS-SVN] r42677 - grass/trunk/imagery/i.smap

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jun 30 03:10:57 EDT 2010


Author: neteler
Date: 2010-06-30 07:10:57 +0000 (Wed, 30 Jun 2010)
New Revision: 42677

Modified:
   grass/trunk/imagery/i.smap/read_sig.c
Log:
catch empty sig files

Modified: grass/trunk/imagery/i.smap/read_sig.c
===================================================================
--- grass/trunk/imagery/i.smap/read_sig.c	2010-06-30 07:10:10 UTC (rev 42676)
+++ grass/trunk/imagery/i.smap/read_sig.c	2010-06-30 07:10:57 UTC (rev 42677)
@@ -26,6 +26,9 @@
     if (I_ReadSigSet(fd, S) < 0 || Ref.nfiles != S->nbands)
 	G_fatal_error(_("Signature file <%s> is invalid"), parms->sigfile);
 
+    if (S->ClassSig == NULL || S->title == NULL)
+	G_fatal_error(_("Signature file <%s> is empty"), parms->sigfile);
+
     fclose(fd);
 
     return 0;



More information about the grass-commit mailing list