The DOC_VALID
check needs to be moved up before the 2nd line of the function where doc->editor
is dereferenced, like this:
static gboolean
automark(gpointer user_data)
{
GeanyDocument *doc = (GeanyDocument *)user_data;
/* during timeout document could be destroyed so check everything again */
if (!DOC_VALID(doc))
return FALSE;
GeanyEditor *editor = doc->editor;
static GeanyEditor *editor_cache = NULL;
ScintillaObject *sci = editor->sci;
gchar *text;
static gchar text_cache[GEANY_MAX_WORD_LENGTH] = {0};
gint match_flag = SCFIND_MATCHCASE | SCFIND_WHOLEWORD;
struct Sci_TextToFind ttf;
source_id = 0;
/* Do not highlight while selecting text and allow other markers to work */
if (sci_has_selection(sci))
return FALSE;
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.