In the following, the last `printf` to output before the segfault is `3 SCNotification`. So apparently just testing `!editor->document->changed` is causing the segfault? ``` bool NewPluginClass::editor_notify(GObject *object, GeanyEditor *editor, SCNotification *nt, NewPluginClass *self) { if (!self->enable) { return false; }
printf("1 SCNotification = %lu\n", (ulong)nt); if (!editor) { printf("1a SCNotification = %lu\n", (ulong)nt); return false; }
printf("2 SCNotification = %lu\n", (ulong)nt); if (editor && !editor->document) { printf("2a SCNotification = %lu\n", (ulong)nt); return false; }
printf("3 SCNotification = %lu\n", (ulong)nt); if (editor && editor->document && !editor->document->changed) { printf("3a SCNotification = %lu\n", (ulong)nt); return false; }
printf("4 SCNotification = %lu\n", (ulong)nt); if (editor && !editor->sci) { printf("4a SCNotification = %lu\n", (ulong)nt); return false; }
printf("5 SCNotification = %lu\n", (ulong)nt); if (editor && editor->sci && sci_get_length(editor->sci) == 0) { printf("5a SCNotification = %lu\n", (ulong)nt); return false; } return false; } ```