Skip to content

Instantly share code, notes, and snippets.

@0x1mason
Last active September 5, 2017 00:59
Show Gist options
  • Save 0x1mason/fa719ff1836a3b3830adcc392282b4b5 to your computer and use it in GitHub Desktop.
Save 0x1mason/fa719ff1836a3b3830adcc392282b4b5 to your computer and use it in GitHub Desktop.
diff --git a/src/grib_context.c b/src/grib_context.c
index d4f5a34..d59b7f3 100644
--- a/src/grib_context.c
+++ b/src/grib_context.c
@@ -1018,8 +1018,12 @@ void codes_assertion_failed(const char* message, const char* file, int line)
/* Default behaviour is to abort
* unless user has supplied his own assertion routine */
if (assertion == NULL) {
+ grib_context* c = NULL;
+ c = grib_context_get_default();
fprintf(stderr, "ecCodes assertion failed: `%s' in %s:%d\n", message, file, line);
- abort();
+ if (c->no_abort == 0) {
+ abort();
+ }
}
else {
char buffer[10240];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment