@elextr commented on this pull request.
Perhaps get the doc pointer first and check valid, then link the tasks object lifetime to the doc (if it isn't already).
Otherwise get current doc in the callback, since tasks doesn't write to the doc it won't do any harm if it scans tasks for the visible doc, not the one initially requested so long as its re-scanned when it becomes visible.
The chances of the doc being deleted between the idle being scheduled and the callback is unlikely, but who knows what them plugins will do. Better not to use dangling pointers.
> { + AoTasksUpdateTasksForDocArguments *arguments = data; + AoTasks *t = arguments->t; + GeanyDocument *doc = arguments->doc;
Needs to check valid since its an unknown period and unknown actions before it happens (isn't asynchronous fun!)
> { + AoTasksUpdateTasksForDocArguments *arguments = data; + AoTasks *t = arguments->t;
Will the lifetime of AoTasks object guarantee its still valid (see below)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.