summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/dialogs/export_disass.c4
-rw-r--r--src/gui/dialogs/gotox.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/dialogs/export_disass.c b/src/gui/dialogs/export_disass.c
index 84ccc0a..12fc51f 100644
--- a/src/gui/dialogs/export_disass.c
+++ b/src/gui/dialogs/export_disass.c
@@ -389,7 +389,7 @@ static void start_binary_export(GBufferCache *cache, buffer_export_context *temp
queue = get_work_queue();
- g_buffer_cache_lock(cache);
+ g_buffer_cache_rlock(cache);
count = g_buffer_cache_count_lines(cache);
info->msg = gtk_status_stack_add_activity(get_global_status(), _("Exporting binary content..."), count);
@@ -463,7 +463,7 @@ static void on_binary_export_completed(GSeqWork *work, export_info_t *info)
log_simple_message(LMT_INFO, "Binary content exported!");
- g_buffer_cache_unlock(info->cache);
+ g_buffer_cache_runlock(info->cache);
g_object_unref(G_OBJECT(info->cache));
g_object_unref(G_OBJECT(info->options));
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 */