fix compile failed when enable debug.
Added swoole_event_write.
check null point.