[balsa] completion: Add NULL guards



commit 5f37f1b9521d6bf07cbf8b01f2859ede98fcf59b
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Thu Jun 6 10:08:53 2019 -0400

    completion: Add NULL guards

 libbalsa/completion.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/libbalsa/completion.c b/libbalsa/completion.c
index b50cc579b..b7566a90a 100644
--- a/libbalsa/completion.c
+++ b/libbalsa/completion.c
@@ -296,7 +296,8 @@ void
 libbalsa_completion_set_compare(LibBalsaCompletion          * cmp,
                                 LibBalsaCompletionStrncmpFunc strncmp_func)
 {
+    g_return_if_fail(cmp != NULL);
+    g_return_if_fail(strncmp_func != NULL);
+
     cmp->strncmp_func = strncmp_func;
 }
-
-#define __G_COMPLETION_C__


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]