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:
Checking that editor
, editor->document
, and editor->sci
are not NULL
does not prevent the segfault.
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;
}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.