summaryrefslogtreecommitdiff
path: root/src/gui/dialogs/gotox.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-09-21 22:23:47 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-09-21 22:23:47 (GMT)
commit76fb13178cf6be94b8e01675b37f7cb1b92f7709 (patch)
treea6e6bbc6dde169add608097ceb5658fcb904bd08 /src/gui/dialogs/gotox.c
parentdfe76faf21e254c02c86a1b0b1f8ca8fc07fe027 (diff)
Defined lock mechanism for buffer caches.
Diffstat (limited to 'src/gui/dialogs/gotox.c')
-rw-r--r--src/gui/dialogs/gotox.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/dialogs/gotox.c b/src/gui/dialogs/gotox.c
index ec665c1..2179960 100644
--- a/src/gui/dialogs/gotox.c
+++ b/src/gui/dialogs/gotox.c
@@ -393,6 +393,8 @@ static void add_new_location_to_list(GtkTreeStore *store, GLoadedBinary *binary,
cache = g_loaded_binary_get_disassembly_cache(binary);
+ g_buffer_cache_rlock(cache);
+
cursor = g_binary_cursor_new();
g_binary_cursor_update(G_BINARY_CURSOR(cursor), addr);
@@ -404,6 +406,8 @@ static void add_new_location_to_list(GtkTreeStore *store, GLoadedBinary *binary,
line = g_buffer_cache_find_line_by_index(cache, index);
+ g_buffer_cache_runlock(cache);
+
g_object_unref(G_OBJECT(cache));
/* Adresse en mémoire virtuelle */