[anjuta] language-support-cpp-java: Avoid Gtk-Warnings caused by missing symbol icons



commit 28de6180e92ead12fda264a26ed69b535832353f
Author: Johannes Schmid <jhs gnome org>
Date:   Mon Jan 25 23:02:35 2010 +0100

    language-support-cpp-java: Avoid Gtk-Warnings caused by missing symbol icons

 .../language-support-cpp-java/cpp-java-assist.c    |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plugins/language-support-cpp-java/cpp-java-assist.c b/plugins/language-support-cpp-java/cpp-java-assist.c
index d3a8e50..6da1c6d 100644
--- a/plugins/language-support-cpp-java/cpp-java-assist.c
+++ b/plugins/language-support-cpp-java/cpp-java-assist.c
@@ -161,12 +161,13 @@ create_completion (CppJavaAssist* assist, IAnjutaIterable* iter,
 		if (name != NULL)
 		{
 			CppJavaAssistTag *tag = g_new0 (CppJavaAssistTag, 1);
+			const GdkPixbuf* sym_icon;
 			tag->name = g_strdup (name);
 			DEBUG_PRINT ("Created tag: %s", tag->name);
 			tag->type = ianjuta_symbol_get_sym_type (IANJUTA_SYMBOL (iter),
 													 NULL);
-			tag->icon = gdk_pixbuf_copy (ianjuta_symbol_get_icon (IANJUTA_SYMBOL(iter),
-			                                                      NULL));
+			sym_icon = ianjuta_symbol_get_icon (IANJUTA_SYMBOL(iter), NULL);
+			tag->icon = sym_icon ? gdk_pixbuf_copy (sym_icon) : NULL;
 			tag->is_func = (tag->type == IANJUTA_SYMBOL_TYPE_PROTOTYPE ||
 			                tag->type == IANJUTA_SYMBOL_TYPE_FUNCTION ||
 							tag->type == IANJUTA_SYMBOL_TYPE_METHOD ||



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