[anjuta/gnome-3-4] symbol-db: Ingore files with unknown language (see bgo#678695)



commit 721aa507af3ff5946dd41c6b39b218570b4cb5db
Author: Johannes Schmid <jhs gnome org>
Date:   Sun Jun 24 14:42:28 2012 +0200

    symbol-db: Ingore files with unknown language (see bgo#678695)

 plugins/symbol-db/symbol-db-engine-core.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/plugins/symbol-db/symbol-db-engine-core.c b/plugins/symbol-db/symbol-db-engine-core.c
index bffed50..e8ecc50 100644
--- a/plugins/symbol-db/symbol-db-engine-core.c
+++ b/plugins/symbol-db/symbol-db-engine-core.c
@@ -3252,6 +3252,12 @@ sdb_engine_add_new_db_file (SymbolDBEngine * dbe, const gchar * project_name,
 	
 	/* insert a new entry on db */	
 	language_id = sdb_engine_add_new_language (dbe, language);
+	if (language_id < 0)
+	{
+		DEBUG_PRINT ("Unknown language: %s", language);
+		SDB_UNLOCK(priv);
+		return FALSE;
+	}
 
 	if ((stmt = sdb_engine_get_statement_by_query_id (dbe, PREP_QUERY_FILE_NEW))
 		== NULL)



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