Apparently s->ctx could be NULL. (Coverity ID 147).