I'm going to change everything, I realized that the main problem comes because the function `row_from_cursor` never returns NULL if it fails to find a row, it returns the result of doing `&item->member.row` which will be NULL + the offset of where the property is. With this I also discovered other places on the code where it's possible to get into a segfault, for example when sending the `EM_LINEINDEX` message, this function will check if `row` is null, but because the `row_from_cursor` never return NULL it will never be able to validate that.