[anjuta] language-support-cpp-java: Check that preword exists so the check for single item doesn't crash (bgo



commit 8fc8e1fa68552b80ddc2d142dda831daa18c2e90
Author: Johannes Schmid <jhs gnome org>
Date:   Wed Mar 3 11:29:31 2010 +0100

    language-support-cpp-java: Check that preword exists so the check for single item doesn't crash (bgo#611684)

 .../language-support-cpp-java/cpp-java-assist.c    |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/language-support-cpp-java/cpp-java-assist.c b/plugins/language-support-cpp-java/cpp-java-assist.c
index 391c578..50fd606 100644
--- a/plugins/language-support-cpp-java/cpp-java-assist.c
+++ b/plugins/language-support-cpp-java/cpp-java-assist.c
@@ -401,7 +401,7 @@ cpp_java_assist_update_autocomplete (CppJavaAssist *assist)
 	if (length == 1)
 	{
 		CppJavaAssistTag* tag = completion_list->data;
-		if (g_str_equal (tag->name, assist->priv->pre_word))
+		if (tag->name && assist->priv->pre_word && g_str_equal (tag->name, assist->priv->pre_word))
 		{
 			ianjuta_editor_assist_proposals (assist->priv->iassist, IANJUTA_PROVIDER(assist),
 		                                 NULL, !queries_active, NULL);



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