[gnome-builder] html: fix segfault when completing "<!"
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] html: fix segfault when completing "<!"
- Date: Sun, 11 Jan 2015 07:46:40 +0000 (UTC)
commit 6ed08c56d935bf69bb15817372e4ca8886949f76
Author: Christian Hergert <christian hergert me>
Date: Sat Jan 10 23:41:07 2015 -0800
html: fix segfault when completing "<!"
src/html/gb-html-completion-provider.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/html/gb-html-completion-provider.c b/src/html/gb-html-completion-provider.c
index 7c0476a..dc27177 100644
--- a/src/html/gb-html-completion-provider.c
+++ b/src/html/gb-html-completion-provider.c
@@ -381,9 +381,11 @@ gb_html_completion_provider_populate (GtkSourceCompletionProvider *provider,
{
gchar *element;
- element = get_element (context);
- trie = g_hash_table_lookup (element_attrs, element);
- g_free (element);
+ if ((element = get_element (context)))
+ {
+ trie = g_hash_table_lookup (element_attrs, element);
+ g_free (element);
+ }
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]