about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tools/autocomplete.c10
-rw-r--r--src/xmpp/form.h2
2 files changed, 8 insertions, 4 deletions
diff --git a/src/tools/autocomplete.c b/src/tools/autocomplete.c
index 3361c10b..efff6ee0 100644
--- a/src/tools/autocomplete.c
+++ b/src/tools/autocomplete.c
@@ -62,10 +62,12 @@ autocomplete_new(void)
 void
 autocomplete_clear(Autocomplete ac)
 {
-    g_slist_free_full(ac->items, free);
-    ac->items = NULL;
+    if (ac != NULL) {
+        g_slist_free_full(ac->items, free);
+        ac->items = NULL;
 
-    autocomplete_reset(ac);
+        autocomplete_reset(ac);
+    }
 }
 
 void
@@ -335,4 +337,4 @@ _search_from(Autocomplete ac, GSList *curr, gboolean quote)
     }
 
     return NULL;
-}
\ No newline at end of file
+}
diff --git a/src/xmpp/form.h b/src/xmpp/form.h
index fb2bf80a..816f5df0 100644
--- a/src/xmpp/form.h
+++ b/src/xmpp/form.h
@@ -35,6 +35,8 @@
 #ifndef FORM_H
 #define FROM_H
 
+#include "xmpp/xmpp.h"
+
 DataForm* form_create(xmpp_stanza_t * const stanza);
 xmpp_stanza_t* form_create_submission(DataForm *form);