author | Alberto Bertogli
<albertito@blitiri.com.ar> 2013-10-11 01:42:55 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2013-10-29 02:12:10 UTC |
parent | 92c7a331da5816e2718c076124db5d0abe38feb7 |
libfiu/fiu.c | +6 | -0 |
diff --git a/libfiu/fiu.c b/libfiu/fiu.c index 5d53e82..ce89112 100644 --- a/libfiu/fiu.c +++ b/libfiu/fiu.c @@ -265,6 +265,12 @@ int fiu_fail(const char *name) ef_rlock(); + /* It can happen that someone calls fiu_fail() before fiu_init(); we + * don't want to crash so we just exit. */ + if (enabled_fails == NULL) { + goto exit; + } + pf = wtable_get(enabled_fails, name); /* None found. */