I'm getting a segfault when calling `sci_get_length(editor->sci)` in a function responding to an `editor-notify` signal. This occurs only when dropping files into Geany when no documents are open (the only document is "untitled"). This problem does not occur when:
* Double clicking a file in the file manager * Dragging a file when other documents are open * Draggin a file after modifying the untitled document
Checking that `editor`, `editor->document`, and `editor->sci` are not `NULL` does not prevent the segfault.
```C bool NewPluginClass::editor_notify(GObject *object, GeanyEditor *editor, SCNotification *nt, NewPluginClass *self) { if (!self->enable || !DOC_VALID(editor->document) || !editor->document->changed) { return false; }
if (editor && editor->sci && sci_get_length(editor->sci) == 0) { // testing }
return false; } ```