[Github-comments] [geany/geany-plugins] Automark crashes geany on gtk3 built (#574)
Matthew Brush
notifications at xxxxx
Thu May 16 00:51:43 UTC 2019
The `DOC_VALID` check needs to be moved up before the 2nd line of the function where `doc->editor` is dereferenced, like this:
```c
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 or view it on GitHub:
https://github.com/geany/geany-plugins/issues/574#issuecomment-492875232
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20190515/4bcbccc8/attachment.html>
More information about the Github-comments
mailing list