From 4a7cff6fe71ff99f08e1a68cdf4c69af36296124 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Granjoux?= Date: Sun, 25 Jun 2017 14:11:49 +0200 Subject: [PATCH] Fix Glib-CRITICAL **: Source ID was not found when attempting to remove it In the symbol db plugin, the callback on_editor_buffer_symbols_update_timeout was returning FALSE in some case which automatically remove the source. In this case, we have to clear sdb_plugin->buf_update_timeout_id to indicate that the source is removed. In most of the case, I think it was better to return TRUE to keep checking the buffer even if an update shouldn't be done at the moment. --- plugins/symbol-db/plugin.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/symbol-db/plugin.c b/plugins/symbol-db/plugin.c index 52d22f785..f31db20fd 100644 --- a/plugins/symbol-db/plugin.c +++ b/plugins/symbol-db/plugin.c @@ -461,7 +461,10 @@ on_editor_buffer_symbols_update_timeout (gpointer user_data) sdb_plugin = ANJUTA_PLUGIN_SYMBOL_DB (user_data); if (sdb_plugin->current_editor == NULL) + { + sdb_plugin->buf_update_timeout_id = 0; return FALSE; + } /* check the timer. If it's elapsed enought time since the last time the user * typed in something, than proceed with updating, elsewhere don't do nothing @@ -474,8 +477,10 @@ on_editor_buffer_symbols_update_timeout (gpointer user_data) if (seconds_elapsed < TIMEOUT_SECONDS_AFTER_LAST_TIP) return TRUE; - return editor_buffer_symbols_update (IANJUTA_EDITOR (sdb_plugin->current_editor), + editor_buffer_symbols_update (IANJUTA_EDITOR (sdb_plugin->current_editor), sdb_plugin); + + return TRUE; } static void -- 2.11.4.GIT