From 013c12b0fe918ff00e2ed29a67bb59bffdd23a45 Mon Sep 17 00:00:00 2001 From: zhenwei Date: Thu, 16 Aug 2018 21:37:51 +0800 Subject: [PATCH] Handle the uninitialized situation --- src/dcurl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/dcurl.c b/src/dcurl.c index 045e913..7334604 100644 --- a/src/dcurl.c +++ b/src/dcurl.c @@ -90,6 +90,8 @@ int8_t *dcurl_entry(int8_t *trytes, int mwm) ImplContext *impl = NULL; struct list_head *p; + if (!isInitialized) return NULL; + do { list_for_each(p, &IMPL_LIST) { impl = list_entry(p, ImplContext, list);