diff options
Diffstat (limited to 'src/libwapcaplet.c')
-rw-r--r-- | src/libwapcaplet.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libwapcaplet.c b/src/libwapcaplet.c index 5f7b402..3cac722 100644 --- a/src/libwapcaplet.c +++ b/src/libwapcaplet.c @@ -79,6 +79,7 @@ _lwc_initialise(void) if (ctx->buckets == NULL) { LWC_FREE(ctx); + ctx = NULL; return lwc_error_oom; } @@ -323,7 +324,10 @@ lwc_iterate_strings(lwc_iteration_callback_fn cb, void *pw) { lwc_hash n; lwc_string *str; - + + if (ctx == NULL) + return; + for (n = 0; n < ctx->bucketcount; ++n) { for (str = ctx->buckets[n]; str != NULL; str = str->next) cb(str, pw); |