[GRASS-SVN] r52774 - grass/branches/develbranch_6/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 20 07:05:48 PDT 2012


Author: neteler
Date: 2012-08-20 07:05:47 -0700 (Mon, 20 Aug 2012)
New Revision: 52774

Modified:
   grass/branches/develbranch_6/lib/gis/error.c
Log:
Protect against fatal error handlers calling G_fatal_error() (backport of trunk r40465)

Modified: grass/branches/develbranch_6/lib/gis/error.c
===================================================================
--- grass/branches/develbranch_6/lib/gis/error.c	2012-08-20 14:05:45 UTC (rev 52773)
+++ grass/branches/develbranch_6/lib/gis/error.c	2012-08-20 14:05:47 UTC (rev 52774)
@@ -149,8 +149,13 @@
  */
 int G_fatal_error(const char *msg, ...)
 {
+    static int busy;
     va_list ap;
 
+    if (busy)
+	exit(EXIT_FAILURE);
+    busy = 1;
+
     va_start(ap, msg);
     vfprint_error(ERR, msg, ap);
     va_end(ap);



More information about the grass-commit mailing list