[anjuta] symbol-db: Fix invalid access when loading a project
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] symbol-db: Fix invalid access when loading a project
- Date: Sun, 22 Aug 2010 16:15:43 +0000 (UTC)
commit 1b823323a43ab1171a413e6c353e32f77c1c864e
Author: Sébastien Granjoux <seb sfo free fr>
Date: Sun Aug 22 18:15:17 2010 +0200
symbol-db: Fix invalid access when loading a project
plugins/symbol-db/plugin.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plugins/symbol-db/plugin.c b/plugins/symbol-db/plugin.c
index 5849982..1cafd3b 100644
--- a/plugins/symbol-db/plugin.c
+++ b/plugins/symbol-db/plugin.c
@@ -1380,7 +1380,10 @@ do_check_offline_files_changed (SymbolDBPlugin *sdb_plugin)
continue;
}
- g_hash_table_insert (prj_elements_hash,
+ /* Use g_hash_table_replace instead of g_hash_table_insert because the key
+ * and the value use the same block of memory, both must be changed at
+ * the same time. */
+ g_hash_table_replace (prj_elements_hash,
(gpointer) symbol_db_util_get_file_db_path
(sdb_plugin->sdbe_project,
filename),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]