Branch: refs/heads/master Author: Enrico Tröger enrico.troeger@uvena.de Committer: Enrico Tröger enrico.troeger@uvena.de Date: Sat, 10 Jun 2023 07:42:22 UTC Commit: d6cb2c252b314088dd1ae99bacb1a55794098c79 https://github.com/geany/geany-plugins/commit/d6cb2c252b314088dd1ae99bacb1a5...
Log Message: ----------- Add more sanity checks
Modified Paths: -------------- addons/src/ao_tasks.c
Modified: addons/src/ao_tasks.c 5 lines changed, 4 insertions(+), 1 deletions(-) =================================================================== @@ -576,7 +576,7 @@ static gboolean update_tasks_for_doc_idle_cb(gpointer data) gchar **token; AoTasksPrivate *priv = AO_TASKS_GET_PRIVATE(t);
- if (doc->is_valid) + if (doc->is_valid && priv->active && priv->enable_tasks) { if (clear) ao_tasks_remove(t, doc); @@ -637,6 +637,9 @@ static void update_tasks_for_doc(AoTasks *t, GeanyDocument *doc, gboolean clear) arguments->doc = doc; arguments->clear = clear;
+ if (!doc->is_valid) + return; + /* Check for task tokens in an idle callback to wait until Geany applied Scintilla highlighting * styles as we need them to be set before checking for tasks. */ g_idle_add_full(G_PRIORITY_LOW, update_tasks_for_doc_idle_cb, arguments,
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org