geany/geany — comment on commit f31a84869d45980a7ecb27f5a4d6c3588c547eee
File: src/document.c line 2353
By codebrainz:

I thought there were times when a document could be valid (whatever that means), but not have a Scintilla, ex:
```
g_assert(DOC_VALID(doc));
gtk_widget_destroy(doc->editor->sci);
g_assert(DOC_VALID(doc)); /* still "valid" isn't it? */
```

I see your point though, if a plugin or some broken code has removed the scintilla or swapped it out with another widget, this code here will be the least of our worries :)