[anjuta] symbol-db: Fixed crasher bgo #622139



commit a565c5f236b34bcc2839e4e8d68d00e66fa927e6
Author: Naba Kumar <naba gnome org>
Date:   Sun Jun 20 10:33:07 2010 +0300

    symbol-db: Fixed crasher bgo #622139

 plugins/symbol-db/symbol-db-query-result.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plugins/symbol-db/symbol-db-query-result.c b/plugins/symbol-db/symbol-db-query-result.c
index 6eef0a3..cbd227a 100644
--- a/plugins/symbol-db/symbol-db-query-result.c
+++ b/plugins/symbol-db/symbol-db-query-result.c
@@ -308,10 +308,11 @@ isymbol_get_int (IAnjutaSymbol *isymbol, IAnjutaSymbolField field,
 	if (!val) return 0;
 	if (field == IANJUTA_SYMBOL_FIELD_TYPE)
 	{
-		const gchar* type_str = g_value_get_string (val);
+		if (!G_VALUE_HOLDS_STRING (val))
+			return (gint) IANJUTA_SYMBOL_TYPE_NONE;
 		gint type_val = 
 			(gint)g_hash_table_lookup ((GHashTable*)result->priv->sym_type_conversion_hash, 
-			                           type_str);
+			                           g_value_get_string (val));
 		return type_val;
 	}
 	return g_value_get_int (val);



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